Glob the Builder
A GNU Make and Gulp crossover, using pull-stream
in the engine room.
Usage
// build.js var Build = var marked = var pull = var transform = var build = Build build build
With this build script, the command node build.js --all
will generate a html file in the public
folder for all markdown files found in src
. Running node build.js new-post.html
will only convert src/new-post.md
, if it exists. Using the --clean
flag on either command will delete all generated files before rebuilding. Because of the way we define targets, files not recognized by Glob the Builder will be left untouched.
Creating sourceless files
If you want to create files programmatically, without a corresponding source file on the system, just define plain objects with the properties path
, contents
, and if necessary enc
for the encoding.
build
Pagination and concatenation
You can easily concatenate (or paginate) multiple files using the pull-group
module and the file object model described in the previous section.
var group = build
Using Gulp plugins
Most Gulp plugins can be used too, using the pull-vinyl
and stream-to-pull-stream
modules.
var cssnano = var postcss = var toPull = var vinyl = build
License
Apache-2.0