0.1.0 • Published 8 years ago

generate-boilerplate v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

generate-boilerplate NPM version NPM downloads Build Status

Generate a code project from a declarative boilerplate.

Install

Install with npm:

$ npm install --save generate-boilerplate

Usage

var boilerplate = require('generate-boilerplate');

API

Boilerplate

Create a new Boilerplate, optionally passing a "boilerplate configuration" to initialize with.

Params

  • config {String}
  • returns {Object}: Returns the Assemble instance for chaining

Example

<%= replace("foo", "bar") %>
var h5bp = new app.Boilerplate({
  options: {
    cwd: 'vendor/h5bp/dist'
  },
  root: {src: ['{.*,*.*}'],   dest: 'src/'},
  css:  {src: ['css/*.css'],  dest: 'src/'},
  doc:  {src: ['doc/*.md'],   dest: 'src/'},
  js:   {src: ['js/**/*.js'], dest: 'src/'}
});
console.log(h5bp);

Params

  • options {Object}

Example

var boilerplate = new Boilerplate();

// example usage
boilerplate.expand({
  jshint: {
    src: ['*.js', 'lib/*.js']
  }
});

.boilerplate

Generate a boilerplate from the given config.

Params

  • name {String}
  • config {Object}
  • returns {Object}: Returns the Assemble instance for chaining

Example

var Base = require('base');
var app = new Base();
var config = new Boilerplate({
  foo: {
    src: 'b.txt',
    dest: actual,
    cwd: fixtures
  }
});

app.boilerplate(config)
  .on('error', cb)
  .on('end', function() {
    assert(exists(dest('b.txt')));
    cb();
  });

Contributing

This document was generated by verb-readme-generator (a verb generator), please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. Or visit the verb-readme-generator project to submit bug reports or pull requests for the readme layout template.

Building docs

Generate readme and API documentation with verb:

$ npm install -g verb verb-readme-generator && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb, v0.9.0, on June 18, 2016.