0.0.2 • Published 9 years ago
broccoli-tree-difference v0.0.2
broccoli-tree-difference
Combine nodes yielding a transform node made up of files belonging to one and only one of the input nodes.
Installation
npm install --save-dev broccoli-tree-differenceUsage
var TreeDifference = require('broccoli-tree-difference');
var difference = new TreeDifference(inputNodes, options);inputNodes: An array of nodes, whose contents will be mergedoptions: A hash of options
Options
annotation: A note to help tell multiple plugin instances apart.
Example
If this is your Brocfile.js:
var TreeDifference = require('broccoli-tree-difference');
vat Funnel = require('broccoli-funnel');
module.exports = new TreeDifference(['public', new Funnel('public', { srcDir: 'images', destDir: 'images' })]);And your project contains these files:
.
├─ public
│ ├─ index.html
│ └─ images
│ └─ logo.png
…Then running broccoli build the-output will generate this folder:
the-output
└─ index.htmlThis is a pretty pedantic example, but here we're taking the difference of a tree and one of its subtrees.
Contributing
Clone this repo and run the tests like so:
npm install
npm testIssues and pull requests are welcome. If you change code, be sure to re-run
npm test. Oftentimes it's useful to add or update tests as well.