broccoli-shallow-tree
v0.0.2
Published
Create a tree with files but WITHOUT subdirectories
Downloads
2
Readme
#broccoli-shallow-tree Broccoli plugin for creating trees that DO NOT recurse into subdirectories
Installation
At the root of your development project type:
npm install broccoli-shallow-tree --save
Usage
The signature of the plugin is:
var tree = shallowTree(inputTree, options) { }
Where the
inputTree
is either a broccoli tree or a string representing a directory which should be converted to a treeOptions include:
srcDir
- an optional offset from the inputTree which points to the root of the source directorydestDir
- an optional offset off of root destination directoryfiles
- an optional array of files to "white list" into the shallow treeexcludeFiles
- an optional arrray of files to "black list" out of the shallow tree
Both files
and excludeFiles
allow for explicit file naming or filename wildcarding (e.g., '*.js' to represent all js files).
This plugin should be used in your brocfile.js
in manner similar to this:
var shallow = require('broccoli-shallow-tree');
var tree = shallow('/', {
files: ['Brocfile.js','*.md'],
excludeFiles: ['CHANGELOG.md']
});
module.exports = tree;
In the example above a tree would be built off your root application directory and would include your Brocfile and all Markdown documents except the CHANGELOG.md
. It would look for this pattern in all files in the app root but it would not recurse into subdirectories to further the search.
Code Documentation
Code documentation can be found here:
Licensing
All of broccoli-shallow-tree is licensed under the MIT license.
Copyright (c) 2014 Ken Snyder
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.