assets-manager
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -302,3 +302,7 @@ 'use strict'; | ||
if ((0, _minimatch2.default)(target.dest, _glob, { matchBase: true })) { | ||
processes.push(options.processes[_glob]); | ||
if (Array.isArray(options.processes[_glob])) { | ||
processes = processes.concat(options.processes[_glob]); | ||
} else { | ||
processes.push(options.processes[_glob]); | ||
} | ||
} | ||
@@ -308,2 +312,3 @@ } | ||
if (processes.length !== 0) { | ||
promise = promise.then(function () { | ||
@@ -310,0 +315,0 @@ return _this7.read(target.dest, opts).then(function (content) { |
{ | ||
"name": "assets-manager", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "Copy packages files based on manifest file", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/amazingSurge/assets-manager", |
@@ -377,2 +377,16 @@ # assets-manager [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url] | ||
It support function string. | ||
```js | ||
"processes": { | ||
"*.css": "function(content) { return content.replace('foo', 'bar');}" | ||
} | ||
``` | ||
Also it support function array. | ||
```js | ||
"processes": { | ||
"*.css": ["function(content) { return content.replace('foo', 'bar');}"] | ||
} | ||
``` | ||
#### renames | ||
@@ -379,0 +393,0 @@ It will rename the files when copy to target directory. Regex supported. |
78500
1704
430