0.0.2 • Published 11 years ago

generator-module v0.0.2

Weekly downloads
6
License
-
Repository
github
Last release
11 years ago

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

Folders and files 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 scarffold 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.1 2013-10-21

  • minimal release

License

MIT License

0.0.2

11 years ago

0.0.1

11 years ago