Assemble plugin that adds a .selectFiles
method to the instance, for reading in a glob of files and prompting the user to select the files they want to write to the file system.
You might also be interested in assemble-select-views.
Install with npm:
$ npm install assemble-select-files --save
Example
var select = require('assemble-select-files');
var assemble = require('assemble');
var app = assemble();
// register the plugin
app.use(select());
Example usage
// create a collection
app.create('pages');
// register an engine for rendering ".hbs" files
app.engine('hbs', require('engine-handlebars'));
// ask the user which files they want to render and write to the file system
app.selectFiles('*.hbs', function(err, files) {
// `files` is the array of rendered files
console.log(files);
});
You might also be interested in these projects:
- assemble-select-views: Assemble plugin that adds a
.selectViews
method to the instance, for prompting the user to… more | homepage - assemble: Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… more | homepage
- generate: Fast, composable, highly extendable project generator with a user-friendly and expressive API. | homepage
- templates: System for creating and managing template collections, and rendering templates with any node.js template engine.… more | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on May 09, 2016.