{"name":"base-pipeline","description":"base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines.","version":"0.3.2","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.8.2","extend-shallow":"^2.0.1","is-valid-app":"^0.1.2","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.4","base-plugins":"^0.4.12","base-runtimes":"^0.1.11","base-task":"^0.5.0","buffer-equal":"^1.0.0","graceful-fs":"^4.1.4","gulp":"^3.9.1","gulp-eslint":"^2.0.0","gulp-format-md":"^0.1.9","gulp-istanbul":"^0.10.4","gulp-mocha":"^2.2.0","minimist":"^1.2.0","mocha":"^2.5.3","rimraf":"^2.5.2","should":"^8.4.0","sinon":"^1.17.4","vinyl":"^1.1.1"},"keywords":["api","app","application","base","baseplugin","building-blocks","create","file","framework","fs","pipeline","plugin","plugins","system","tool","toolkit","tools","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":"3d8ea36e6e003e060557040d6eb1de02c1e0029c","_id":"base-pipeline@0.3.2","_shasum":"9e5526b3e265d90a926decf13b5f27598d3d4c55","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9e5526b3e265d90a926decf13b5f27598d3d4c55","tarball":"http://registry-npm.ywwl.com/base-pipeline/download/base-pipeline-0.3.2.tgz","integrity":"sha512-YqLA/1smD1h6zY7+k7sf8fbmsuG53eya4Gng8rrofohBmBCwaOx0043A0s/GfjGkDANY9NBuK0KA4JoaIrD8pQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGaBO5ts17LHu024G527aC8cWEIZUtzqYoOYJ3KCor9oAiEA7sIy9qjqC9NBz7UNWc0nFSBh0rFsyXEyRKILpZnnbXE="}],"size":2920,"noattachment":false,"key":"/base-pipeline/-/base-pipeline-0.3.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/base-pipeline-0.3.2.tgz_1467067644272_0.40062922635115683"},"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":1467067646652,"_cnpm_publish_time":1467067646652,"dist-tags":{"latest":"0.3.2"}}