asset-versioning
Advanced tools
Comparing version 0.0.2 to 0.0.3
Usage: asset-versioning build [globs] [options] | ||
Versions the files matched by globs. Writes a JSON object | ||
mapping the original filenames to the versioned filenames to stdout. | ||
Versions the files matched by globs. Writes a JSON object mapping | ||
the original filenames to the versioned filenames to stdout. | ||
@@ -19,3 +19,3 @@ Globs: | ||
Example: | ||
asset-versioning build 'css/**/*.css' 'js/**/*.js' --outputDirectory build | ||
asset-versioning build 'css/**/*.css' 'js/**/*.js' --outputDirectory build > manifest.json | ||
@@ -5,3 +5,4 @@ | ||
Replaces original filenames with their versioned filenames (as | ||
specified in a manifest) in the files matched by globs. | ||
specified in a manifest) in the files matched by globs. Ignores | ||
binary files matched by the globs. | ||
@@ -8,0 +9,0 @@ Globs: |
{ | ||
"name": "asset-versioning", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Version your assets by appending a hash to the filename.", | ||
@@ -36,2 +36,6 @@ "author": "Lim Yuan Qing", | ||
}, | ||
"files": [ | ||
"bin/", | ||
"index.js" | ||
], | ||
"keywords": [ | ||
@@ -38,0 +42,0 @@ "asset", |
@@ -7,4 +7,2 @@ # asset-versioning [](https://www.npmjs.org/package/asset-versioning) [](https://travis-ci.org/yuanqing/asset-versioning) | ||
Using the CLI: | ||
```sh | ||
@@ -14,3 +12,3 @@ $ asset-versioning build 'css/**/*.css' 'js/**/*.js' --outputDirectory build | asset-versioning replace 'build/**/*' | ||
Or equivalently, using the API: | ||
Or, equivalently, using the API: | ||
@@ -38,4 +36,4 @@ ```js | ||
Versions the files matched by globs. Writes a JSON object | ||
mapping the original filenames to the versioned filenames to stdout. | ||
Versions the files matched by globs. Writes a JSON object mapping | ||
the original filenames to the versioned filenames to stdout. | ||
@@ -54,3 +52,3 @@ Globs: | ||
Example: | ||
asset-versioning build 'css/**/*.css' 'js/**/*.js' --outputDirectory build | ||
asset-versioning build 'css/**/*.css' 'js/**/*.js' --outputDirectory build > manifest.json | ||
``` | ||
@@ -66,6 +64,7 @@ | ||
Replaces original filenames with their versioned filenames (as | ||
specified in a manifest) in the files matched by globs. | ||
specified in a manifest) in the files matched by globs. Ignores | ||
binary files matched by the globs. | ||
Globs: | ||
One or more globs. (Ignores binary files.) | ||
One or more globs. | ||
@@ -91,3 +90,3 @@ Options: | ||
## assetVersioning.build(globs [, options]) | ||
### assetVersioning.build(globs [, options]) | ||
@@ -104,7 +103,7 @@ Versions the files matched by `globs`. Returns a Promise for an object mapping the original filenames to the versioned filenames. | ||
## assetVersioning.replace(globs, manifest [, options]) | ||
### assetVersioning.replace(globs, manifest [, options]) | ||
Replaces original filenames with their versioned filenames (as specified in the `manifest`) in the files matched by `globs`. | ||
Replaces original filenames with their versioned filenames (as specified in the `manifest`) in the files matched by `globs`. Ignores binary files matched by the `globs`. | ||
- `globs` is an array of one or more globs. (Ignores binary files.) | ||
- `globs` is an array of one or more globs. | ||
- `manifest` is an object mapping the original filenames to the versioned filenames. | ||
@@ -111,0 +110,0 @@ - `options` is an object literal: |
2
18087
8
155
126