0.9.11 • Published 10 years ago

generator-pkg v0.9.11

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

generator-pkg

Node.JS generator for multiple NPM module types and testing frameworks

Contents

Installation

To install generator-pkg from npm, run:

$ npm install -g generator-pkg

Finally, initiate the generator:

$ yo pkg
  • Test frameworks: mocha, tape, and redtape
  • BDD test libraries: expect.js, chai and 'none'
  • Module types: Basic, Middleware (express) or CLI (submit a pull request with yours)

This generator will install the following files:

  • package-json - initialized with the answers to all your questions.
  • Gruntfile.js (if grunt is selected) - configured to use the following grunt modules:
    • grunt-complexity - show code complexity
    • grunt-contrib-jshint - run code through jshint
    • grunt-contrib-watch - watch for changes then run tests
    • grunt-mocha-cli (if mocha is selected as a test framework) - run mocha tests (because mocha -w sucks)
    • grunt-tape (if 'tape' or 'redtape' is selected as a test framework) - run tape tests
  • .jshintrc - with some sane defaults (for me anyway!)
  • .jshintignore - with some sane defaults (for me anyway!)
  • .travis.yml - set up so you can push and get travis-ci continous integration tests.
  • .gitignore - ignore the usual cruft.
  • LICENSE - MIT initialized with your details.
  • README.md - Initialized with your details and travis-ci badges.
  • index.js - Initial library file
  • test/index.js - First unit test for mocha, tape, and redtape

Add your own module

  • Fork
  • Copy app/templates/modules/basic.js to app/templates/modules/YOUR_MODULE.js
  • Edit app/templates/modules/YOUR_MODULE.js

License

MIT

Credits

A fork of generator-nodejs with a lot of mods

0.9.11

10 years ago

0.9.7

10 years ago

0.9.4

10 years ago

0.9.1

10 years ago

0.8.5

10 years ago

0.8.4

10 years ago

0.7.11

10 years ago

0.7.1

10 years ago

0.6.9

10 years ago

0.6.6

10 years ago

0.6.5

10 years ago

0.5.19

10 years ago

0.5.15

10 years ago

0.5.14

10 years ago