generator-module

0.0.2 • Public • Published

generator-module Build Status

A Yeoman generator for Browserify/old school import style modules

Getting Started

Install

Install Yeoman and the generator-module

$ npm install -g yo generator-module

Usage

Launch the generator:

$ yo module

Generator result

Assuming a module named my-module

Generated tree

my-module
|-- Gruntfile.js
|-- LICENSE
|-- README.md
|-- browsers.json
|-- example
|   |-- example.js
|   `-- index.html
|-- lib
|   `-- index.js
|-- package.json
`-- test
    |-- index.html
    `-- test.js

Usage

Fetch all module dependencies with npm

npm install

import module via browserify

var aModule = require('my-module');
 
// by default, the generator scaffold a function as default module implementation
aModule();

import the old school style

just import the lib/index.js script.

Module example

Install and build the example

npm run build-example

Open example/index.html in your favorite browser

Test module

Build tests with

npm run build-test

Then open test/index.html to run the tests.

Test module on saucelabs with mocha

npm test

Test generator

npm test

ChangeLog

v0.0.2 2013-11-21

  • [FIX] camelize module name in source files

v0.0.1 2013-10-21

  • minimal release

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i generator-module

Weekly Downloads

0

Version

0.0.2

License

none

Last publish

Collaborators

  • 42loops