Skip to content

Instantly share code, notes, and snippets.

@jonschlinkert
Last active August 29, 2015 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonschlinkert/9685144 to your computer and use it in GitHub Desktop.
Save jonschlinkert/9685144 to your computer and use it in GitHub Desktop.
This verbfile adds some basic logging and changes the dest directory to `book/`. (if you don't use a verbfile, verb-cli will just process templates in the `docs` directory by default.)
var file = require('fs-utils');
module.exports = function(verb) {
verb.log.subhead('building', 'My Book');
// Process templates
file.writeFileSync('book/', verb.read('src/*.tmpl.md', {
data: 'chapters/*.json' // custom metadata for templates
}));
verb.log.success(' Done');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment