A modular Yeoman generator to create or update node modules. It's composed of several subgenerators, relatively unopinionated, usable by themselves. Most but not all input values are remembered.
yo nom
will ask you which subgenerators to execute, then executes those in order as listed below. Those you successfully ran before will be disabled by default. Run any of them separately with yo nom:*
. For example: yo nom:travis
to just setup Travis.
npm
Create package.json
, .gitignore
, install test framework (tape, tap, mocha, grunt, cake, or ava), add LICENSE
file (MIT, BSD2 or BSD3). If a package.json
already exists, it will be merged, used for default answers and for sort order of the top-level fields. At deeper levels, like dependencies, nom behaves like npm and sorts lexicographically.
git
Initialize local git repository, unless .git
directory exists.
github
Create public or private GitHub project, named "module-name" or "node-module-name". Unless local git already has configured remotes. Asks for access token and repository owner (which defaults to the owner of the token), skips creation if the repository already exists, adds URLs to package.json
and adds remote origin.
travis
Add .travis.yml
for node 0.10 and iojs, setup GitHub hook. The travis
tool asks for username and password.
appveyor
Add appveyor.yml
for node 0.10 and iojs, setup GitHub hook. Asks for access token.
cli
Create a CLI app (with meow) and add a bin
field to package.json
. Asks for name and path.
style
(todo)Add standard
or xo
as a pretest script.
readme
Add readme.md
with common sections and shield.io badges for npm and david. If you did the travis and/or appveyor setup, badges for those services will be added as well.
gulp
Create an ES5 or ES6 gulpfile and tasks
directory. Installs gulp
and if ES6, babel-core
.
mkdir my-module
cd my-module
yo nom
Install Yeoman and generator-nom globally with npm:
npm i yo generator-nom -g
package.json
will always be created (for example, when running nom:gulp
by itself).index.js
) is optionalpackage.json
, except for dependencies which are always sorted lexicographically (like npm does).package.json
, npm config (legacy formats too) and git config. Because Yeoman reads the git config by spawning git, it is done lazily, as a last resort.MIT © ironSource. Originally forked from generator-n © Andrei Kashcha. Small parts borrowed from generator-nm © Sindre Sorhus.