0.3.0 • Published 7 years ago

generator-javascript-module v0.3.0

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

JavaScript Module Generator

Version NPM dependencies

Scaffold and develop modern clientside JavaScript libraries with Yeoman. This generator sets up an ES6-ready JavaScript workflow including:

Installation

Install Yeoman and the module generator

$ npm install -g yo generator-javascript-module

Then use it

$ yo javascript-module

Developing your module

Your ES6 library lives in the src directory and is automatically built into ES5 bundles in the root of your project - [module-name].js and [module-name].min.js.

Run gulp to build your module, watch for changes, and serve a demo page. Or run gulp build to just build the bundles.

There's a demo page setup in demo/index.html for showing what your library does in a typical browser environment. It's served on localhost:3000 with Browsersync.

Tests are written in ES6 and kept in the test/ directory. Describe tests with Mocha and run assertions with Chai. Tests are run in the browser using Karma, via the Web Component Tester framework. Build and run tests with gulp test.

This generator expects that your module will be published to NPM under the module name you provide. The following bundles are distributed in your package.json:

  • Main entrypoint (Node/Require): [module-name].js
  • ES6 entrypoint (ES6-aware bundlers): src/[module-name].js
  • Browser entrypoint (Unpkg): [module-name].min.js

MIT © Sean King

0.3.0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago