Skip to content

Commit f368c7d

Browse files
authored
Added .process()
Process files through plugins without writing out files
1 parent cb818d0 commit f368c7d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

lib/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ Metalsmith.prototype.build = unyield(function*(){
198198
return files;
199199
});
200200

201+
/**
202+
* Process files through plugins without writing out files.
203+
*
204+
* @return {Object}
205+
*/
206+
207+
Metalsmith.prototype.process = unyield(function*(){
208+
var files = yield this.read();
209+
files = yield this.run(files);
210+
return files;
211+
});
212+
201213
/**
202214
* Run a set of `files` through the plugins stack.
203215
*

0 commit comments

Comments
 (0)