boilerplate
Advanced tools
+0
-1
| 'use strict'; | ||
| var utils = require('expand-utils'); | ||
| var extend = require('extend-shallow'); | ||
| var define = require('define-property'); | ||
@@ -6,0 +5,0 @@ var Target = require('expand-target'); |
+28
-26
| { | ||
| "name": "boilerplate", | ||
| "description": "Tools and conventions for authoring and publishing boilerplates that can be generated by any build system or generator.", | ||
| "version": "0.4.1", | ||
| "version": "0.4.2", | ||
| "homepage": "http://boilerplates.io", | ||
@@ -26,5 +26,4 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
| "expand-utils": "^0.1.4", | ||
| "extend-shallow": "^2.0.1", | ||
| "scaffold": "^0.2.5", | ||
| "use": "^1.1.2" | ||
| "scaffold": "^0.2.6", | ||
| "use": "^2.0.0" | ||
| }, | ||
@@ -34,7 +33,7 @@ "devDependencies": { | ||
| "gulp-eslint": "^1.1.1", | ||
| "gulp-format-md": "^0.1.4", | ||
| "gulp-format-md": "^0.1.9", | ||
| "gulp-istanbul": "^0.10.3", | ||
| "gulp-mocha": "^2.2.0", | ||
| "mocha": "*", | ||
| "should": "*" | ||
| "mocha": "^2.4.5", | ||
| "should": "^8.3.1" | ||
| }, | ||
@@ -68,3 +67,16 @@ "keywords": [ | ||
| ], | ||
| "lint-deps": { | ||
| "ignore": [ | ||
| "recipes" | ||
| ] | ||
| }, | ||
| "verb": { | ||
| "toc": false, | ||
| "layout": "default", | ||
| "tasks": [ | ||
| "readme" | ||
| ], | ||
| "plugins": [ | ||
| "gulp-format-md" | ||
| ], | ||
| "related": { | ||
@@ -82,25 +94,15 @@ "list": [ | ||
| "reflinks": [ | ||
| "gulp", | ||
| "grunt", | ||
| "assemble", | ||
| "boilerplate", | ||
| "metalsmith", | ||
| "yeoman", | ||
| "guide", | ||
| "broccoli", | ||
| "expand-files", | ||
| "expand-target", | ||
| "grunt", | ||
| "gulp", | ||
| "metalsmith", | ||
| "scaffold", | ||
| "template", | ||
| "templates", | ||
| "verb", | ||
| "yeoman" | ||
| "verb" | ||
| ], | ||
| "plugins": [ | ||
| "gulp-format-md" | ||
| ] | ||
| }, | ||
| "lint-deps": { | ||
| "ignore": [ | ||
| "recipes" | ||
| ] | ||
| "lint": { | ||
| "reflinks": true | ||
| } | ||
| } | ||
| } |
+43
-169
@@ -1,5 +0,13 @@ | ||
| # boilerplate [](https://www.npmjs.com/package/boilerplate) [](https://travis-ci.org/jonschlinkert/boilerplate) | ||
| # boilerplate [](https://www.npmjs.com/package/boilerplate) [](https://npmjs.org/package/boilerplate) [](https://travis-ci.org/jonschlinkert/boilerplate) | ||
| > Tools and conventions for authoring and publishing boilerplates that can be generated by any build system or generator. | ||
| Tools and conventions for authoring and publishing boilerplates that can be generated by any build system or generator. | ||
| ## Install | ||
| Install with [npm](https://www.npmjs.com/): | ||
| ```sh | ||
| $ npm install boilerplate --save | ||
| ``` | ||
| Welcome to boilerplate! Here you'll find both the tools and conventions for creating project boilerplates. | ||
@@ -9,3 +17,3 @@ | ||
| 1. Makes it easy to create and publish new projects from boilerplates that have reusable [scaffolds](https://github.com/jonschlinkert/scaffold), templates, styles, themes, data etc. | ||
| 1. Makes it easy to create and publish new projects from boilerplates that have reusable [scaffolds][scaffold], templates, styles, themes, data etc. | ||
| 2. To uncouple these "non-moving-parts" from any particular build system or generator, so we can easily generate new projects by simply passing the boilerplate config object to your build system or project generator of choice! | ||
@@ -21,3 +29,3 @@ | ||
| The configuration is similar to how [Grunt](http://gruntjs.com/) tasks would be defined. | ||
| The configuration is similar to how [grunt](http://gruntjs.com/) tasks would be defined. | ||
@@ -51,21 +59,6 @@ ```js | ||
| The `Boilerplate` library "expands" this configuration into a normalized object that can easily be passed to [gulp](http://gulpjs.com), [grunt](http://gruntjs.com/), [assemble](http://assemble.io), [metalsmith](https://github.com/segmentio/metalsmith), or even [yeoman](http://yeoman.io), for scaffolding out various parts of a blog, website, web application or whatever you think a boilerplate might be useful for! | ||
| The `Boilerplate` library "expands" this configuration into a normalized object that can easily be passed to [gulp](http://gulpjs.com), [grunt](http://gruntjs.com/), [assemble](https://github.com/assemble/assemble), [metalsmith](https://github.com/segmentio/metalsmith), or even [yeoman](http://yeoman.io), for scaffolding out various parts of a blog, website, web application or whatever you think a boilerplate might be useful for! | ||
| ## Table of contents | ||
| - [html5-boilerplate example](#html5-boilerplate-example) | ||
| - [About](#about) | ||
| * [Comparison table](#comparison-table) | ||
| - [Install](#install) | ||
| - [Usage](#usage) | ||
| - [API](#api) | ||
| - [Related projects](#related-projects) | ||
| - [Test coverage](#test-coverage) | ||
| - [Running tests](#running-tests) | ||
| - [Contributing](#contributing) | ||
| - [Author](#author) | ||
| - [License](#license) | ||
| _(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ | ||
| ## html5-boilerplate example | ||
@@ -220,10 +213,10 @@ | ||
| * [API](#api) for actually creating boilerplates | ||
| * [documentation](./docs/getting-started.md) and [guide](./docs/guide.md) to help you get started with [authoring](./docs/authoring.md) your own boilerplates | ||
| * [website](http://boilerplates.io) for discovering boilerplates created by the community | ||
| * [documentation](./docs/getting-started.md) and [guide](./docs/guide.md) to help you get started with [authoring](docs/authoring.md) your own boilerplates | ||
| * [website](https://github.com/jonschlinkert/boilerplate) for discovering boilerplates created by the community | ||
| **What does this NOT provide?** | ||
| Workflows and tools for actually generating new projects from a boilerplate. This is a job much better suited for build systems like [assemble](http://assemble.io), [gulp](http://gulpjs.com), [grunt](http://gruntjs.com/), [broccoli](https://github.com/broccolijs/broccoli), and [yeoman](http://yeoman.io). | ||
| Workflows and tools for actually generating new projects from a boilerplate. This is a job much better suited for build systems like [assemble](https://github.com/assemble/assemble), [gulp](http://gulpjs.com), [grunt](http://gruntjs.com/), [broccoli](https://github.com/broccolijs/broccoli), and [yeoman](http://yeoman.io). | ||
| If you publish a library that works with Boilerplate, please [let us know about it](https://github.com/boilerplates/boilerplates/issues/new?title=boilerplate-%5Bname%20here%5D&body=I%20created%20a%20new%20boilerplate%253A%0A%0A*%20homepage%253A%20%5Bproject%20url%5D%20%0A*%20description%253A%20%5Bboilerplate%20description%5D)! | ||
| If you publish a library that works with Boilerplate, please [let us know about it](https://github.com/boilerplates/boilerplates/issues/new?title=boilerplate-%5Bname%20here%5D&body=I%20created%20a%20new%20boilerplate%3A%0A%0A*%20homepage%3A%20%5Bproject%20url%5D%20%0A*%20description%3A%20%5Bboilerplate%20description%5D)! | ||
@@ -234,3 +227,3 @@ ### Comparison table | ||
| | **type** | **description** | | ||
| | **type** | **description** | | ||
| | --- | --- | | ||
@@ -241,139 +234,17 @@ | [template](https://github.com/jonschlinkert/templates) | Resuable file, code or content which contains "placeholder" values that will eventually be replaced with real values by a rendering (template) engine | | ||
| ## Install | ||
| ## Test coverage | ||
| Install with [npm](https://www.npmjs.com/): | ||
| As of May 11, 2016: | ||
| ```sh | ||
| $ npm i boilerplate --save | ||
| ``` | ||
| ## Usage | ||
| ```js | ||
| var boilerplate = require('boilerplate'); | ||
| Statements : 100% (40/40) | ||
| Branches : 100% (24/24) | ||
| Functions : 100% (4/4) | ||
| Lines : 100% (39/39) | ||
| ``` | ||
| ## API | ||
| ## Related projects | ||
| ### [Boilerplate](index.js#L28) | ||
| You might also be interested in these projects: | ||
| Expand a declarative configuration with scaffolds and targets. Create a new Boilerplate with the given `options` | ||
| **Params** | ||
| * `options` **{Object}** | ||
| **Example** | ||
| ```js | ||
| var boilerplate = new Boilerplate(); | ||
| // example usage | ||
| boilerplate.expand({ | ||
| jshint: { | ||
| src: ['*.js', 'lib/*.js'] | ||
| } | ||
| }); | ||
| ``` | ||
| ### [.isBoilerplate](index.js#L71) | ||
| Static method, returns `true` if the given value is an instance of `Boilerplate` or appears to be a valid `boilerplate` configuration object. | ||
| **Params** | ||
| * `config` **{Object}**: The value to check | ||
| * `returns` **{Boolean}** | ||
| **Example** | ||
| ```js | ||
| Boilerplate.isBoilerplate({}); | ||
| //=> false | ||
| var h5bp = new Boilerplate({ | ||
| options: {cwd: 'vendor/h5bp/dist'}, | ||
| root: {src: ['{.*,*.*}'], dest: 'src/'}, | ||
| // ... | ||
| }); | ||
| Boilerplate.isBoilerplate(h5bp); | ||
| //=> true | ||
| ``` | ||
| ### [.expand](index.js#L122) | ||
| Expand and normalize a declarative configuration into scaffolds, targets, and `options`. | ||
| **Params** | ||
| * `boilerplate` **{Object}**: Boilerplate object with scaffolds and/or targets. | ||
| * `returns` **{Object}** | ||
| **Example** | ||
| ```js | ||
| boilerplate.expand({ | ||
| options: {}, | ||
| marketing: { | ||
| site: { | ||
| mapDest: true, | ||
| src: 'templates/*.hbs', | ||
| dest: 'site/' | ||
| }, | ||
| docs: { | ||
| src: 'content/*.md', | ||
| dest: 'site/' | ||
| } | ||
| }, | ||
| developer: { | ||
| site: { | ||
| mapDest: true, | ||
| src: 'templates/*.hbs', | ||
| dest: 'site/' | ||
| }, | ||
| docs: { | ||
| src: 'content/*.md', | ||
| dest: 'site/docs/' | ||
| } | ||
| } | ||
| }); | ||
| ``` | ||
| ### [.addScaffold](index.js#L162) | ||
| Add a scaffold to the boilerplate, while also normalizing targets with src-dest mappings and expanding glob patterns in each target. | ||
| **Params** | ||
| * `name` **{String}**: the scaffold's name | ||
| * `boilerplate` **{Object}**: Scaffold object where each key is a target or `options`. | ||
| * `returns` **{Object}** | ||
| **Example** | ||
| ```js | ||
| boilerplate.addScaffold('assemble', { | ||
| site: {src: '*.hbs', dest: 'templates/'}, | ||
| docs: {src: '*.md', dest: 'content/'} | ||
| }); | ||
| ``` | ||
| ### [.addTarget](index.js#L190) | ||
| Add a target to the boilerplate, while also normalizing src-dest mappings and expanding glob patterns in the target. | ||
| **Params** | ||
| * `name` **{String}**: The target's name | ||
| * `target` **{Object}**: Target object with a `files` property, or `src` and optionally a `dest` property. | ||
| * `returns` **{Object}** | ||
| **Example** | ||
| ```js | ||
| boilerplate.addTarget({src: '*.hbs', dest: 'templates/'}); | ||
| ``` | ||
| ## Related projects | ||
| * [assemble](https://www.npmjs.com/package/assemble): Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… [more](https://www.npmjs.com/package/assemble) | [homepage](https://github.com/assemble/assemble) | ||
@@ -387,11 +258,18 @@ * [boilerplate](https://www.npmjs.com/package/boilerplate): Tools and conventions for authoring and publishing boilerplates that can be generated by any build… [more](https://www.npmjs.com/package/boilerplate) | [homepage](http://boilerplates.io) | ||
| ## Test coverage | ||
| ## Contributing | ||
| As of January 17, 2016: | ||
| Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/boilerplate/issues/new). | ||
| ## Building docs | ||
| Generate readme and API documentation with [verb](https://github.com/verbose/verb): | ||
| ```sh | ||
| $ npm install verb && npm run docs | ||
| ``` | ||
| Statements : 100% (40/40) | ||
| Branches : 100% (24/24) | ||
| Functions : 100% (4/4) | ||
| Lines : 100% (39/39) | ||
| Or, if [verb](https://github.com/verbose/verb) is installed globally: | ||
| ```sh | ||
| $ verb | ||
| ``` | ||
@@ -404,9 +282,5 @@ | ||
| ```sh | ||
| $ npm i -d && npm test | ||
| $ npm install -d && npm test | ||
| ``` | ||
| ## Contributing | ||
| Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/boilerplate/issues/new). | ||
| ## Author | ||
@@ -421,7 +295,7 @@ | ||
| Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) | ||
| Released under the MIT license. | ||
| Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). | ||
| Released under the [MIT license](https://github.com/jonschlinkert/boilerplate/blob/master/LICENSE). | ||
| *** | ||
| _This file was generated by [verb](https://github.com/verbose/verb) on January 17, 2016._ | ||
| _This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 11, 2016._ |
5
-16.67%18671
-11.68%185
-0.54%292
-30.14%+ Added
- Removed
Updated
Updated