generator-js-browser-module
v0.1.0
Published
Yeoman generator to create a browser based Javascript modules
Downloads
1
Readme
generator-js-browser-module
Yeoman generator
Getting Started
What is Yeoman?
Trick question. It's not a thing. It's this guy:
Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.
Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.
npm install -g yo
Yeoman Generators
Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.
To install generator-js-browser-module from npm, run:
npm install -g generator-js-browser-module
Finally, initiate the generator:
yo js-browser-module
Getting To Know Yeoman
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.
If you'd like to get to know Yeoman better and meet some of his friends, Grunt and Bower, check out the complete Getting Started Guide.
Basic Usage
Grunt
Gruntfiles can become massive rather quickly. To combat this, generator-js-browser-module splits each Grunt task option into it's own file located in the tasks
folder and each additional registered task in the register
folder. Adding a new Grunt tasks is as simple as copying an existing config file, updating it, and saving in the save folder. Grunt will automatically read and process everything in the config folder. In addition to that, you do not need to manually load any tasks. jit-grunt lazy loads modules as needed.
Default Task
The default grunt
command watches the project and then concats any files in the src/
directory, runs any unit tests, jshint, jscs, and finally Flow.
test
Task
The grunt test
command runs any unit tests then, jshint, jscs, and flow.
build
Task
The grunt build
command runs the test
command then concats everything in the src/
folder and minifies it.
Unit Testing
generator-js-browser-module uses Jasmine and Karma for unit testing. Tests are kept in the tests/specs
folder and are run with the npm test
command.
License
MIT
Release History
- v0.1.0 - Initial Relase