@bigstickcarpet/generator-npm

My Yeoman generator for scaffolding npm projects


Keywords
yeoman-generator, npm, node, browserify
License
MIT
Install
npm install @bigstickcarpet/generator-npm@1.6.1

Documentation

Yeoman logo

Dependencies npm License

This is my Yeoman generator for scaffolding npm projects. It's pretty tailored to my personal tastes, but feel free to use it if you want. Maybe our tastes are similar.

Features

  • Prompts you for all info and options. No need to remember a bunch of command line arguments.
  • Generates "ignore" files – .gitignore, .npmignore, .jshintignore
  • Enforces code styling via .jshintrc, .jscsrc, .editorconfig
  • Keeps your dependencies up-to-date via npm-check-updates
  • Adds npm scripts for building, testing, deploying, and updating dependencies.
  • Unit testing with Mocha, Chai, and Sinon, plus code coverage via Istanbul
  • Web browser support via Browserify, Bower, and Karma

Installation

Install the generator using npm.

npm install -g @bigstickcarpet/generator-npm

NOTE: Yeoman generators must be installed globally (using the -g flag). If you get any permissions errors, you can fix them by granting yourself access to the npm directories. Using sudo or an administrator account as a workaround is not recommended.

Getting Started

To scaffold an npm project, just run the following command.

yo @bigstickcarpet/npm

Depending on where you run this command, it will behave slightly differently:

  • When run in an existing npm project directory, it will update and/or repair any missing/corrupted files in the project.

  • When run in any other directory, it will create a brand new npm project. You will be prompted for the project name and other information.