You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**`test`**|`{RegExp}`|`.`|All assets matching this `{RegExp}` are processed|
41
+
|**`asset`**|`{String}`|`[path].gz[query]`|The target asset name. `[file]` is replaced with the original asset. `[path]` is replaced with the path of the original asset and `[query]` with the query|
42
+
|**`filename`**|`{Function}`|`false`|A `{Function}``(asset) => asset` which receives the asset name (after processing `asset` option) and returns the new asset name|
43
+
|**`algorithm`**|`{String\|Function}`|`gzip`|Can be `(buffer, cb) => cb(buffer)` or if a {String}` is used the algorithm is taken from `zlib`|
44
+
|**`threshold`**|`{Number}`|`0`|Only assets bigger than this size are processed. In bytes.|
45
+
|**`minRatio`**|`{Number}`|`0.8`|Only assets that compress better that this ratio are processed|
46
+
|**`deleteOriginalAssets`**|`{Boolean}`|`false`|Whether to delete the original assets or not|
39
47
40
-
*`asset`: The target asset name. `[file]` is replaced with the original asset. `[path]` is replaced with the path of the original asset and `[query]` with the query. Defaults to `"[path].gz[query]"`.
41
-
*`filename`: A `function(asset)` which receives the asset name (after processing `asset` option) and returns the new asset name. Defaults to `false`.
42
-
*`algorithm`: Can be a `function(buf, callback)` or a string. For a string the algorithm is taken from `zlib` (or zopfli for `zopfli`). Defaults to `"gzip"`.
43
-
*`test`: All assets matching this RegExp are processed. Defaults to every asset.
44
-
*`threshold`: Only assets bigger than this size are processed. In bytes. Defaults to `0`.
45
-
*`minRatio`: Only assets that compress better that this ratio are processed. Defaults to `0.8`.
46
-
*`deleteOriginalAssets`: Whether to delete the original assets or not. Defaults to `false`.
47
48
48
-
Option Arguments for Zopfli (see [node-zopfli](https://github.com/pierreinglebert/node-zopfli#options) doc for details):
0 commit comments