A tiny app to compile Handlebars to HTML.
const compile = require('handlebars-compile');
const settings = {
src: 'handlebars/**/*.hbs'
dest: 'target/html'
};
compile(settings);
For additional usage examples, see /spec
;
Type: Object
Default: None
Global data object.
Type: String
Default: The process current working directory
Type: String || Array
Default: None
The set of JSON you'd like to use as your data set.
For each provided file, the primary key to access it's data is the basename of the JSON file.
Type: String || Array
Default: '**/*Helper.js'
Paths to the directories of your Handlebars helpers.
Type: String || Array
Default: '**/*Partials.js'
Paths to the directories of your Handlebars partials.
Type: String || Array
Default: '**/layouts/**/*.hbs'
Paths to the directories of your layout files.
Refer to handlebars-layouts for usage.
Type: String
Default: None
This option is required.
Paths to the directories of the files you'd like to compile.
Type: String
Default: None
The directory from which src patterns should be matched. This is stripped from the dest directory.
Type: String
Default: None
This option is required.
Path to the directory where the compiled html should be saved.
Type: Boolean
Default: false
If the compiled files should saved to a flatten directory or if they should maintain the src directory structure.