3.0.0 • Published 5 years ago

generator-amd v3.0.0

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

generator-amd

NPM version Dependency Status Build Status

About

A generator for Yeoman.

It provides a basic boilerplate for a single AMD module, which features:

  • dependency management with Bower
  • JSDoc documentation created on build
  • a functional example
  • buildable with Grunt
  • ready for Github and to be published itself on Bower

The proposed Grunt build for the generated AMD module has the following tasks:

  • Code quality check: JSHint
  • Code style check: JSCS
  • Minification of the module: UglifyJS
  • Creation of a sourcemap along the minified module
  • Automatic creation of the documentation: JSDoc
  • Automatic versioning of all the project when version is modified in package.json
  • Opens automagically the project in your browser and reloads the page on each change made to the project (liverelaod)

Installation

You must have Nodejs and NPM installed.

Then, to install Yeoman globally from npm, run:

npm install -g yo

Finally, to install generator-amd globally from npm, run:

npm install -g generator-amd

Usage of the generator

Once you have installed Node, NPM and Yeoman, you can initiate the generator:

yo amd

Yeoman will ask you 3 questions:

  1. your github account (e.g. gitaccount)
  2. the name of the repository on Github (e.g. my-amd-module)
  3. the name of the function that the module defines (e.g. myAmdModule)

Build the sources of your generated AMD module

In order to build your generated AMD module from its source, you will also need Grunt. To install Grunt globally on the command line (and run the above build task), run:

npm install -g grunt-cli

Once you have generated your AMD module skeleton, you can build the minified files, the documentation and the example with Grunt:

grunt build

You can also launch the grunt serve task to load the "example" folder in your browser and benefit from livereload of the page in the browser once you edit one of your source file or one of the example files:

grunt serve

Build the generator from its sources

The generator itself can be built from its sources. At the moment, the build process only includes syntax checks with JSHint and JSCS.

In order to build the generator from its source, you will need Grunt. To install Grunt globally on the command line (and run the above build task), run:

npm install -g grunt-cli

Just run the grunt task in the folder where your generator is installed:

grunt

Built with Grunt

Credits

This generator bundles Require.js for the generated example's purposes.

License

This generator is released under the MIT License.

3.0.0

5 years ago

2.0.0

7 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.11.1

8 years ago

0.11.0

8 years ago

0.10.0

8 years ago

0.9.4

9 years ago

0.9.3

11 years ago

0.9.2

11 years ago

0.9.1

11 years ago

0.9.0

11 years ago

0.8.0

11 years ago

0.7.3

11 years ago

0.7.2

11 years ago

0.7.1

11 years ago

0.7.0

11 years ago

0.6.0

11 years ago

0.5.1

11 years ago

0.4.0

11 years ago

0.3.3

11 years ago

0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago

0.2.0

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago