A generator for Yeoman
Want to see pretty graphs? Log in now!
npm install generator-nj
|6||downloads in the last week|
|6||downloads in the last month|
|Last Published By|
|Version||0.1.2 last updated 3 months ago|
|Keywords||yeoman-generator, node, jasmine|
A generator for [Yeoman].
Why another generator for node module with/without Jasmine test?
There are couple of similar ones in the Yeoman community generators. I would be happy if this can add just a little bit more value to them.
For unit test, I decided to use jasmine-node. It's more intuitive. If I get used to it, it will help me to use Jasmine for the js module development for the web app. For example, you can use Jasmine with Karma for angularjs unit testing.
For simple node module, sometimes I don't need the test framework. So Jasmine should be the option which I can go with or without it.
.jshintrc should be better. For Jasmine spec, it should have Jasmine globals to avoid jshint complain about 'describe' and 'it' functions. For Gruntfile.js, there should be one line which can avoid camelcase check for 'jasmine_node' task.
Gruntfile.js should be set up properly. When I need Jasmine, it should have grunt-jasmine-node and necessary settings. When I don't need it, it shouldn't have it.
There are many default which makes me happy such as package.json having 'private': false as default.
To install generator-nj from npm, run:
$ npm install -g generator-nj
Finally, initiate the generator:
$ yo nj
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.