Glob the Builder
A GNU Make and Gulp crossover, using
pull-stream in the engine room.
// build.jsvar Build =var marked =var pull =var transform =var build = Buildbuildbuild
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
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
contents, and if necessary
enc for the encoding.
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
var cssnano =var postcss =var toPull =var vinyl =build