## Usage ```js var boilerplate = require('{%= name %}'); var App = require('base-app'); var app = new App(); app.use(boilerplate()); ``` ## Example **Download h5bp** To run the example, first you'll need to git clone [html5-boilerplate](https://github.com/h5bp/html5-boilerplate) with the following command: ```js $ git clone https://github.com/h5bp/html5-boilerplate.git vendor/h5bp ``` **Configuration** The following examples returns a normalized configuration object that includes every file in the [html5-boilerplate](https://github.com/h5bp/html5-boilerplate) project, organized exactly the way the project itself is organized. ```js var Boilerplate = require('boilerplate'); var boilerplate = new Boilerplate({ options: { cwd: 'vendor/h5bp/dist', destBase: 'src' }, site: { root: {src: ['{.*,*.*}'], dest: 'root'}, css: {src: ['css/*.css'], dest: 'assets/css'}, js: {src: ['js/**/*.js'], dest: 'assets/js'}, doc: {src: ['doc/*.md'], dest: 'docs'} }, }); ``` **Generate** Pass the configuration to the `.boilerplate` or `.boilerplateStream` method to "build" the boilerplate. In this example we're not doing any additional processing, so the source files will simply be copied to the specified destination directories. ```js // stream app.boilerplateStream(boilerplate) .on('end', function() { console.log('done'); }); // async callback app.boilerplate(boilerplate, function(err) { if (err) return console.error(err); console.log('done'); }); ``` ## API {%= apidocs("index.js") %}