Skip to content

Instantly share code, notes, and snippets.

@jonschlinkert
Last active February 3, 2018 05:52
Show Gist options
  • Save jonschlinkert/9685280 to your computer and use it in GitHub Desktop.
Save jonschlinkert/9685280 to your computer and use it in GitHub Desktop.
Example verbfile: process templates in the `src` directory and save the rendered files to `docs/`.
var file = require('fs-utils');
module.exports = function(verb) {
// Process templates
file.writeFileSync('docs/', verb.read('src/*.tmpl.md', {
data: 'src/*.json' // custom metadata for templates
}));
};
@jonschlinkert
Copy link
Author

Normally, verb-cli looks for templates to process in the docs directory then writes the rendered files to the root of the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment