base-files-each
Base plugin for iterating over an array of 'files' objects in a declarative configuration and writing them to the file system.
Install
Install with npm:
$ npm install --save base-files-each
Usage
var files = ;
Example
var expand = ;var Base = ;var pipeline = ;var each = ;var vfs = ;var app = ; app;app;app; // register pipeline plugins using the `.plugin` methodapp; // use `expand-files` to expand a declarative configuration objectconfig = ; // pass the config object to `.each()`app ;
API
.each
Iterate over an array of files
objects in a declarative configuration, optionally run them through a plugin pipline, then write the files to the file system.
Params
config
{Object}cb
{Function}: Optional callback function. If callback is not passed,.eachStream
is called and a stream is returned.
Example
var expand = ;var config = expand;generate; // orgenerate ;
.eachSeries
Generate files
configurations in series.
Params
config
{Object}cb
{Function}
Example
var expand = ;var config = expand;generate;
.eachStream
Generate files
configurations in parallel.
Params
config
{Object}returns
{Stream}: returns stream with all process files
Example
var expand = ;var config = expand;generate ;
About
Related projects
- base-files-process: Plugin for processing files from a declarative configuration. | homepage
- base-fs: base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file… more | homepage
- base-pipeline: base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines. | homepage
- base-task: base plugin that provides a very thin wrapper around https://github.com/doowb/composer for adding task methods to… more | homepage
- base: base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… more | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on July 18, 2016.