GitXplorerGitXplorer
n

generator-jsmodule

public
68 stars
7 forks
2 issues

Commits

List of commits on branch master.
Unverified
d0baabc203c7984f02383842d2b72161c9dc245e

README: unmaintained

nnecolas committed 9 years ago
Unverified
6788ff9dfa3993ca9497462e85329f4a1d63f32f

v0.2.0

nnecolas committed 11 years ago
Unverified
2e5a8d19cf09a917b4da6c57e1d38609b2862dee

Update CHANGELOG

nnecolas committed 11 years ago
Unverified
99b7f72ba2465c86fccb48c63718eb8779903198

Update to Karma 0.10.x in generated browser module

nnecolas committed 11 years ago
Unverified
bc693166a553e0d8bb0798a6c1ea94b3330dc0b2

Add `peerDependencies` to `package.json`

nnecolas committed 11 years ago
Unverified
06cef3391a08522471001c0aff0d638f4b3f1675

v0.1.5

nnecolas committed 12 years ago

README

The README file for this repository.

JavaScript module generator

unmaintained

Build Status

A Yeoman generator for JavaScript modules.

Installation

Install Node.js (which comes with npm).

Then globally install the generator.

npm install -g generator-jsmodule

Make a new directory, and cd into it:

mkdir mymodule && cd $_

Now scaffold out a JS module using the yo command (and optionally passing a name for your module):

yo jsmodule <module-name>

All your dependencies will automatically be installed unless you include the --skip-install option.

Generators

Available generators (to be run in the root directory).

  • jsmodule <module-name> (aka jsmodule:app)
  • jsmodule:browser <module-name>

N.B. You should replace the placeholder GitHub username in the Travis CI build-status paths at the top of the generated README.

jsmodule:app

Generates the boilerplate you need for a simple Node.js module.

Example:

yo jsmodule mymodule

Produces:

.
├── node_modules
│   ├── chai
│   └── mocha
├── test
│   └── test.js
├── .gitignore
├── .jshintrc
├── .travis.yml
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── mymodule.js
└── package.json

jsmodule:browser

Generates the boilerplate you need for a simple client-side JavaScript module.

It setups the Karma test runner to run unit tests in the browser. Unit tests rely on the Mocha test framework and the Chai assertion library.

Example:

yo jsmodule:browser mymodule

Produces:

.
├── bower_components
│   └── chai
├── node_modules
│   └── karma
├── test
│   └── test.js
├── .gitignore
├── .jshintrc
├── .travis.yml
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── bower.json
├── karma.conf.js
├── mymodule.js
└── package.json

Running your module's tests

The client-side JS package uses a local installation of Karma to run the unit tests. You can easily autowatch your tests during development:

karma start

Or run the unit tests in CI with:

npm test

For further information about configuring Karma, please refer to the Karma website.