generator-bespokeplugin

Yeoman generator for Bespoke.js plugins

npm install generator-bespokeplugin
13 downloads in the last week
24 downloads in the last month

Build Status

Bespoke.js Plugin Generator

A generator for Yeoman that scaffolds a Bespoke.js plugin.

The boilerplate plugin includes a Grunt build system with JSHint, Jasmine and UglifyJS preconfigured.

Usage

Install Yeoman and generator-bespokeplugin:

$ npm install -g yo generator-bespokeplugin

Make a new directory and cd into it:

$ mkdir bespoke-myplugin && cd $_

Scaffold a new plugin:

$ yo bespokeplugin

Plugin workflow

All source files for the plugin reside in the src directory.

Jasmine specs reside in the spec directory.

Distributable versions of your plugin are generated in the dist directory by the following Grunt tasks:

Grunt tasks

Lint, test, concatenate and minify source files:

$ grunt

Lint and test your plugin whenever source files change:

$ grunt watch

By default, your plugin is validated with grunt-micro to ensure it is less than 1KB.

Register with Bower

Register plugin with Bower:

$ bower register <my-plugin-name> <git-endpoint>

Bower uses Git tags for versioning.

To publish an update, first modify the version number in bower.json, then tag a new version and push to origin:

$ git add .
$ git commit -m "Bump to vX.X.X"
$ git tag -a vX.X.X -m "vX.X.X"
$ git push --tags origin master

Publish to npm

By default, your plugin is configured to work with browserify.

$ npm publish

License

MIT License

npm loves you