{
  "name": "plumber",
  "version": "0.3.0",
  "description": "A tool for managing web asset pipelines",
  "main": "index",
  "directories": {
    "lib": "./lib",
    "example": "./examples"
  },
  "dependencies": {
    "extend": "~1.2.1",
    "glob": "~3.2.6",
    "flatten": "0.0.1",
    "gaze": "~0.4.3",
    "mercator": "~0.1.7",
    "highland": "~1.16.2"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/plumberjs/plumber.git"
  },
  "keywords": [
    "build",
    "assets",
    "pipeline"
  ],
  "author": {
    "name": "Sébastien Cevey",
    "email": "seb@cine7.net"
  },
  "license": "GPL",
  "bugs": {
    "url": "https://github.com/plumberjs/plumber/issues"
  },
  "readme": "Plumber\n=======\n\nA Node-based tool for managing declarative web asset pipelines.\n\nTo install plumber, use `npm` to install the `plumber-cli` module\n(globally for ease of use):\n\n```\n$ sudo npm install -g plumber-cli\n```\n\nFor an introduction, you may want to read the blog post [Abstracting away the grunt work with Plumber](http://bytes.inso.cc/2014/01/21/abstracting-away-the-grunt-work-with-plumber/).\n\n\n## Example\n\n```\nvar all       = require('plumber-all');\nvar glob      = require('plumber-glob');\nvar bower     = require('plumber-bower');\nvar requirejs = require('plumber-requirejs');\nvar uglifyjs  = require('plumber-uglifyjs')();\nvar hash      = require('plumber-hash')();\nvar concat    = require('plumber-concat');\nvar less      = require('plumber-less')();\nvar filter    = require('plumber-filter');\nvar write     = require('plumber-write');\n\nmodule.exports = function(pipelines) {\n\n    var sources = glob.within('src');\n    var writeToDist = write('dist');\n\n    var requireConfig = {\n        paths: {\n            'event-emitter': '../../eventEmitter/EventEmitter'\n        },\n        shim: {\n            'event-emitter': {exports: 'EventEmitter'}\n        }\n    };\n\n    // Compile all JavaScript\n    pipelines['compile:js'] = [\n        all(\n            sources('js/require.conf.js'),\n            [sources('js/modules/app.js'), requirejs(requireConfig)],\n            bower('underscore'),\n            bower('pikaday', 'pikaday.js')\n        ),\n        uglifyjs,\n        hash,\n        writeToDist\n    ];\n\n    // Compile stylesheets\n    pipelines['compile:css'] = [\n        all(\n            sources('stylesheets/reset.css'),\n            [sources('stylesheets/less/*.less'), less],\n            [bower('pikaday'), filter.type('css')]\n        ),\n        concat('style'),\n        writeToDist\n    ];\n\n};\n```\n\nThe `Plumbing.js` file above defines two sample pipelines:\n\n- *compile:js*: Take all of the RequireJS config file, the main AMD\n   `app.js` file compiled by RequireJS, the file exported by the\n   `underscore` Bower component and the `pikaday.js` file in the\n   `pikaday` Bower component, minimise all the JavaScript, hash the\n   filenames and write the resulting JavaScript, sourcemaps and asset\n   mapping files in the `dist` directory.\n\n- *compile:css*: Take all of the `reset.css` file, the LESS files\n  compiled to CSS, and the CSS files exported by the `pikaday`\n  Bower component, concatenate them all into a single file named\n  `style.css` and write the result in the `dist` directory.\n\nYou can run each individual pipeline with `plumber <pipeline>` or\nall of them with `plumber`.\n\n*Note: the syntax is still being defined and may change in the\nfuture.*\n\n\n## Operations\n\n### Sourcing\n\n- [glob](https://github.com/theefer/plumber-glob): find files using a path or pattern\n- [bower](https://github.com/theefer/plumber-bower): find files from a [Bower](http://bower.io/) component\n- [lodash](https://github.com/theefer/plumber-lodash): generate a custom [Lo-Dash](http://lodash.com/) build\n\n### Outputting\n\n- [write](https://github.com/theefer/plumber-write): write the result into files or directories\n- [s3](https://github.com/theefer/plumber-s3): write files to Amazon S3\n\n### Compilation\n\n- [less](https://github.com/theefer/plumber-less): compile [LESS](http://lesscss.org/) files to CSS\n- [requirejs](https://github.com/theefer/plumber-requirejs): compile an AMD module and its dependencies together\n- [uglifyjs](https://github.com/theefer/plumber-uglifyjs): minimise JavaScript using [UglifyJS](http://lisperator.net/uglifyjs/)\n- [mincss](https://github.com/theefer/plumber-mincss): minimise CSS (using LESS)\n\n### Transformation\n\n- [rename](https://github.com/theefer/plumber-rename): rename the filename of the input\n- [concat](https://github.com/theefer/plumber-concat): concatenate all the input together\n- [filter](https://github.com/theefer/plumber-filter): filter the input (e.g. based on file type)\n- [hash](https://github.com/theefer/plumber-hash): hash the filenames and generate a mapping\n\n### Testing\n\n- [jshint](https://github.com/theefer/plumber-jshint): run [JSHint](http://www.jshint.com/) on the input and produce a report\n\n### Meta-operation\n\n- [all](https://github.com/theefer/plumber-all): pass the input into the given set of operations and return the result\n\n\n\n## Principles\n\n- Avoid boilerplate, use sensible defaults\n- Hide operation internals behind a standard interface\n- Make it trivial to write new operations\n- Support outputing auxiliary files (sourcemaps, hash mapping, etc)\n- Treat single-run and watch as different executions of a same defined pipeline\n- Aim for high performance (exploit parallelism, caching, dirty-checking)\n- Rely on typing of files to assert applicability of operations\n- Allow specification of input files from config or as CLI arguments\n- Support building assets and running linting/tests in the same way\n\n\n## Architecture\n\nMost web asset building can be described as a pipeline of operations.\nEach operation takes one or more files as input and returns one or\nmore files as output.  The output of an operation can be piped as\ninput to the next operation, creating a linear pipeline.  Typically,\nsource files are fed to the pipeline and the generated files are\nwritten to a destination directory.\n\nThis model works for a variety of file types (JavaScript,\nCoffeeScript, LESS, Sass, etc) and a variety of operations (minimize,\ntranspile, AMD compilation, concatenation, etc).  Linting and testing\ncan even be modeled as a pipeline, where the output is the result or\nreport.\n\nAn operation should only be concerned about doing a single thing well,\nand it is asynchronous by default using Promises.  Performance\noptimisation such as parallelism and caching are outside the scope of\noperations; instead, they are the sole concern of Plumber.\n\nFile data is currently being passed as strings, rather than streams,\nbecause most libraries that operations wrap do not support streams\nnatively anyway...\n\n\n## Related projects\n\n### [Grunt](http://gruntjs.com/)\n\nThe most popular task runner.  Tasks are completely independent and\nexecuted imperatively.\n\n### [Gulp](https://github.com/wearefractal/gulp) and [James](https://github.com/leonidas/james.js)\n\nBoth are stream-based pipelines of operations.  The main difference\nwith Plumber is the current lack of support for auxiliary files\n(e.g. sourcemaps) and the treatment of watch as a special listener\nwhich triggers a given block (e.g. re-run) on change.\n",
  "readmeFilename": "README.md",
  "homepage": "https://github.com/plumberjs/plumber",
  "_id": "plumber@0.3.0",
  "dist": {
    "shasum": "d7a4900f400a195de03f91965bca8db2737c9674"
  },
  "_resolved": "git://github.com/plumberjs/plumber.git#170c4da09f4af84a65186373767eddfbfda0c746",
  "_from": "plumber@git://github.com/plumberjs/plumber.git#highland"
}
