node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



< Yeoman generator create scaffolding node modules />


Install generator-nodeModule from npm, run:

$ npm install -g yo
$ npm install -g generator-new-node-module

Finally initiate the generator:

$ yo new-node-module



You need Yeoman to run this command.

yo new-node-module
→ create package.json
→ create
→ create LICENSE
→ create
→ create src/index.js
→ create test/index.js
→ create .editorconfig
→ create .gitignore
→ create .travis.yml
→ create .eslintrc


  • Add code to src/index.js and tests to test/index.js.

  • Lint, build and test a project with npm run build.

  • Build and watch changes in src/ with npm run watch

  • Run only tests with npm run test.

  • Check coverage with npm run coverage.

  • Generate a TOC for the CHANGELOG with npm run toc

  • Deploy to a remote origin with npm run deploy.

  • Bump version and publish a package with npm run major or minor/patch