Write clean modern JS modules that run everywhere
Want to see pretty graphs? Log in now!
npm install generator-omni-module
|6||downloads in the last week|
|25||downloads in the last month|
|Last Published By|
|Version||1.0.1 last updated 6 months ago|
|Keywords||yeoman-generator, module, npm, bower, amd, commonjs|
Make a module you can use everywhere
You have written an amazing new JS library and now it's time to distribute it to the world. Use this Yeoman generator to make your module accessible on both the client side (RequireJS + Bower) and the server (CommonJS + NPM).
With all the popularity your universally accessible module will gain you'll want to be sure it's easy for you to maintain and others to improve. That's why the boilerplate comes ready-made with a test suite and Travis hooks. It has a solid JSHint config and includes a lint step as part of continuous integration so your codebase will stay fresh and consistent no matter how many people modify it.
Create the boilerplate
mkdir your-module && cd $_ npm install -g yo npm install -g generator-omni-module yo omni-module
Answer the questions it asks you.
- Add the Github upstream specified in
- Write your lovely code and a README.
Testing your module
You will want both of these commands to be passing on stable code branches.
grunt jshint # run JSHint on all code and tests grunt test # run Mocha test suite
Publishing your module
- Register your module with Bower:
bower register <my-package-name> <git-endpoint>
- Bump the version, tag the code, and publish with
grunt bump npm publish
(see more options for version bumping)
The generator-omni-module is Copyright © 2013 Joe Nelson. It is free software, and may be redistributed under the terms specified in the LICENSE file.