slush-js-skeleton

Generate node and/or browser skeleton. Readme.md + package.json + bower.json + gulpfile.js + mocha test harness (with browser support) + jshint + jscoverage.

Usage no npm install needed!

<script type="module">
  import slushJsSkeleton from 'https://cdn.skypack.dev/slush-js-skeleton';
</script>

README

slush-js-skeleton Build Status NPM version Bitdeli Badge

Generate node and/or browser package skeleton. Readme.md + package.json + bower.json + gulpfile.js + mocha test harness (with browser support) + jshint + jscoverage.

Features

  • Create node and/or browser packages
  • Readme, package.json, and bower.json boilerplate
  • Gulp task runner boilerplate
  • Automatic docs and readme generation using jsdoc-to-markdown
  • Test harness using mocha and chai assertions
  • Browser tests using mocha-phantomjs for browser packages
  • Code instrumentation task with coverage report using jscoverage
  • Report test coverage to coveralls.io
  • Lint code style and semantics with JSHint and JSCS

Installation

Install slush if you haven't:

npm install --global slush

Install slush-js-skeleton:

npm install --global slush-js-skeleton

Usage

mkdir myproject
cd myproject
slush js-skeleton

Gulp tasks provided

help

List available tasks.

test

Run tests using mocha or mocha-phantomjs for browser packages.

docs

Generate jsdoc-to-markdown and insert into readme template.

coverage

Output test coverage to coverage.html using jscoverage.

coveralls

Send test coverage to coveralls.io.

wrap-umd

Wrap in Universal Module Definition for distribution and save in dist.

dist

Generate docs and if browser package, a UMD distribution.

jshint

Lint code semantics with JSHint.

jscs

Lint code style with JSCS.

lint

Lint code semantics and style.

watch

Watch for file changes and run tests and jshint.

Contributing

Please submit all issues and pull requests to the alexmingoia/slush-js-skeleton repository!

Support

If you have any problem or suggestion please open an issue here.