{"name":"base-pipeline","version":"0.3.0","description":"base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines.","homepage":"https://github.com/node-base/base-pipeline","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/node-base/base-pipeline.git"},"bugs":{"url":"https://github.com/node-base/base-pipeline/issues"},"license":"MIT","files":["index.js","utils.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"base-option":"^0.7.0","extend-shallow":"^2.0.1","is-registered":"^0.1.4","is-valid-instance":"^0.1.0","kind-of":"^3.0.3","lazy-cache":"^2.0.1","stream-combiner":"^0.2.2","through2":"^2.0.1"},"devDependencies":{"base":"^0.8.1","base-config":"^0.5.2","base-fs":"^0.3.1","base-plugins":"^0.4.9","base-runtimes":"^0.1.5","base-task":"^0.4.2","buffer-equal":"^1.0.0","graceful-fs":"^4.1.3","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.7","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.2.0","minimist":"^1.2.0","mocha":"^2.4.5","rimraf":"^2.5.2","should":"^8.3.0","sinon":"^1.17.3","vinyl":"^1.1.1"},"keywords":["base","baseplugin","file","fs","system","vinyl"],"verb":{"run":true,"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["base-cli","base-config","base-data","base-methods","base-options","base-plugins","base-store"]},"reflinks":["verb"],"lint":{"reflinks":true}},"gitHead":"8b52ba47034480e18ec07b03f0802642697aa0ec","_id":"base-pipeline@0.3.0","_shasum":"a955b537980c67499f9c6f65567c229751aa7e60","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.5.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"a955b537980c67499f9c6f65567c229751aa7e60","tarball":"http://registry-npm.ywwl.com/base-pipeline/download/base-pipeline-0.3.0.tgz","integrity":"sha512-qIfFWqy3+we8tYiaTW6PwOn4qG6jscXk+UmwhAubVN1eod2YbtcFcDXKReaQc2Is2Ir2XLb9yhCE0ET6Y+TCDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF0SJA0dNIlnJbEBDy2somnFJKmo+ESimUsF/WrymFFiAiEAn6zN4b+s5bfzkr+5xLsHqKStuhB6B+4C3VmFt12GMqE="}],"size":4329,"noattachment":false,"key":"/base-pipeline/-/base-pipeline-0.3.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/base-pipeline-0.3.0.tgz_1463497981992_0.5453990257810801"},"directories":{},"readme":"# base-pipeline [![NPM version](https://img.shields.io/npm/v/base-pipeline.svg?style=flat)](https://www.npmjs.com/package/base-pipeline) [![NPM downloads](https://img.shields.io/npm/dm/base-pipeline.svg?style=flat)](https://npmjs.org/package/base-pipeline) [![Build Status](https://img.shields.io/travis/node-base/base-pipeline.svg?style=flat)](https://travis-ci.org/node-base/base-pipeline)\n\nbase-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install base-pipeline --save\n```\n\n## Usage\n\n```js\nvar base = require('base-methods');\nvar pipeline = require('base-pipeline');\nvar bfs = require('base-fs');\n\n// create your application and add the plugin\nvar app = base()\n  .use(pipeline())\n  .use(bfs)\n\n// plugins may return a function\napp.plugin('a', function() {\n  return through.obj(function(file, enc, next) {\n    next(null, file);\n  });\n});\n\n// or a stream\napp.plugin('b', through.obj(function(file, enc, next) {\n  next(null, file);\n}));\n\n// use registered plugins\napp.src(['foo/*.hbs'])\n  .pipe(app.pipeline(['a', 'b']))\n  .pipe(app.dest('site/'))\n```\n\n## Supported signatures\n\n**Array of registered plugin names:**\n\n```js\n// register plugins\napp.plugin('a', function() {});\napp.plugin('b', function() {});\n\n// pipeline\napp.src(['foo/*.hbs'])\n  .pipe(app.pipeline(['a', 'b']))\n  .pipe(app.dest('site/'))\n```\n\n**List of registed plugin names:**\n\n```js\n// register plugins\napp.plugin('a', function() {});\napp.plugin('b', function() {});\n\n// pipeline\napp.src(['foo/*.hbs'])\n  .pipe(app.pipeline('a', 'b'))\n  .pipe(app.dest('site/'))\n```\n\n**Stacked:**\n\n```js\n// register plugins\napp.plugin('a', function() {});\napp.plugin('b', function() {});\napp.plugin('c', function() {});\n\n// pipeline\napp.src(['foo/*.hbs'])\n  .pipe(app.pipeline('a'))\n  .pipe(app.pipeline('b'))\n  .pipe(app.pipeline('c'))\n  .pipe(app.dest('site/'))\n```\n\n**Functions that return a stream:**\n\n```js\napp.src(['foo/*.hbs'])\n  .pipe(app.pipeline(function() {\n    return through.obj(function(file, enc, next) {\n      next(null, file);  \n    })\n  }))\n  .pipe(app.pipeline(function() {\n    return through.obj(function(file, enc, next) {\n      next(null, file);  \n    })\n  }))\n  .pipe(app.dest('site/'))\n```\n\n**Streams:**\n\nIn general, it's a best practice for plugins to return a function that returns a stream. This ensures that every time the function is called a new stream is returned.\n\n```js\napp.src(['foo/*.hbs'])\n  .pipe(app.pipeline(through.obj(function(file, enc, next) {\n    next(null, file);  \n  }))\n  .pipe(app.pipeline(through.obj(function(file, enc, next) {\n    next(null, file);  \n  }))\n  .pipe(app.dest('site/'))\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [base-cli](https://www.npmjs.com/package/base-cli): Plugin for base-methods that maps built-in methods to CLI args (also supports methods from a… [more](https://www.npmjs.com/package/base-cli) | [homepage](https://github.com/node-base/base-cli)\n* [base-config](https://www.npmjs.com/package/base-config): base-methods plugin that adds a `config` method for mapping declarative configuration values to other 'base'… [more](https://www.npmjs.com/package/base-config) | [homepage](https://github.com/node-base/base-config)\n* [base-data](https://www.npmjs.com/package/base-data): adds a `data` method to base-methods. | [homepage](https://github.com/node-base/base-data)\n* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://www.npmjs.com/package/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods)\n* [base-options](https://www.npmjs.com/package/base-options): Adds a few options methods to base-methods, like `option`, `enable` and `disable`. See the readme… [more](https://www.npmjs.com/package/base-options) | [homepage](https://github.com/jonschlinkert/base-options)\n* [base-plugins](https://www.npmjs.com/package/base-plugins): Upgrade's plugin support in base applications to allow plugins to be called any time after… [more](https://www.npmjs.com/package/base-plugins) | [homepage](https://github.com/node-base/base-plugins)\n* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://www.npmjs.com/package/base-store) | [homepage](https://github.com/node-base/base-store)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/node-base/base-pipeline/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/node-base/base-pipeline/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 25, 2016._","publish_time":1463497984581,"_cnpm_publish_time":1463497984581,"dist-tags":{"latest":"0.3.2"}}