generator-omni-module

Write clean modern JS modules that run 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.

  1. Create the boilerplate

    mkdir your-module && cd $_
    npm install -g yo
    npm install -g generator-omni-module
    yo omni-module
  2. Answer the questions it asks you.

  3. Add the Github upstream specified in package.json

  4. Write your lovely code and a README.

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
  1. Register your module with Bower: bower register <my-package-name> <git-endpoint>
  2. Bump the version, tag the code, and publish with: grunt release

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.