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.
what it does
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.
.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.
Initialize local git repository, unless
.git directory exists.
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.yml for node 0.10 and iojs, setup GitHub hook. The
travis tool asks for username and password.
appveyor.yml for node 0.10 and iojs, setup GitHub hook. Asks for access token.
Create a CLI app (with meow) and add a
bin field to
package.json. Asks for name and path.
xo as a pretest script.
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.
Create an ES5 or ES6 gulpfile and
tasks directory. Installs
gulp and if ES6,
mkdir my-module cd my-module yo nom
Install Yeoman and generator-nom globally with npm:
npm i yo generator-nom -g
- Gulpfile can be in ES5 or ES6.
- Disable gulp subgenerator by default
package.jsonwill always be created (for example, when running
- Generation of main file (
index.js) is optional
- Move CLI to own subgenerator, with new questions for name and path.
- Preserve sort order of existing
package.json, except for dependencies which are always sorted lexicographically (like npm does).
- CI targets node 0.10 and 4
- Install latest npm on AppVeyor
- Deduce author's name and email from (in order): author field of existing
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.
- Don't humanize author's URL, to keep it "clickable" in editors and other places
- Author URL is optional
- Pin Babel to 5