base-fs-tree
Base plugin for creating file trees using archy. Requires the base-fs plugin, but can also be used as a gulp plugin.
Install
Install with npm:
$ npm install --save base-fs-tree
Usage
var tree = ;
gulp plugin example
The following examples will work with base-fs, gulp, verb, assemble, generate, update or any other application that supports vinyl streams.
var tree = ;var gulp = ; gulp;
Get files before they're modified
If you want to create a tree from the original unmodified source file paths, use .capture()
first thing in the stream:
var tree = ;var gulp = ; gulp;
Command line tips
You can conditionally generate trees using a command line flag, like --tree
.
var tree = ;var gulp = ;var argv = processargv default: tree: false; gulp;
base plugin example
This can also be used as a non-pipeline plugin with base applications. It works by adding .preWrite
middleware and a taskEnd
listener, so that anytime taskEnd
is emitted, a tree will be automatically generates.
This can be useful when you want to automatically generate trees for all tasks in a generate generator, for example.
var tree = ;var vfs = ;var Base = ;var base = ;base;base; app;
About
Related projects
- base-fs-conflicts: Detect potential file system conflicts and if necessary prompt the user before overwriting files. | homepage
- base-fs: base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file… more | homepage
- base-task: base plugin that provides a very thin wrapper around https://github.com/doowb/composer for adding task methods to… more | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.30, on August 09, 2016.