Complete open-source nodeJs library development process
Yeoman generator
Thank you for usage
- github.com and bitbacke.org git repositories support
- base config files: eslint, editorconfig, gitignore
- tests by different engines
- continues integration (by travis-ci)
- code test coverage (by coveralls.io)
- default shields in readme.md for your project (if you specified the repository), such as npm-version, npm-licence, devDependencies, dependencies, travis-ci build status, coverage percent
You need answer on the questions:
- Library Name
(default: directory name)
- Version
(default: 1.0.0)
- Enter git repository
(default: will use from existing file ./.git/config or empty)
- Add Travis-CI?
(default: true)
- Add Coverals.io?
(default: true)
- Test Engine
(default: nodeunit)
- License
(default: MIT)
- CodeFormat: indent type
(default: TAB)
- CodeFormat: indent size
(default: 4)
To install generator-node-lib from npm, run:
$ npm install -g generator-node-lib
Finally, initiate the generator:
$ yo node-lib
#or, if you want to install dependencies manually
$ yo node-lib --slip-install
After answers on all questions you have base infrastructure for development, testing and deployment your library
Install dependencies of your library
$ npm install
Watch project files and run check tasks (eslint, tests)
$ grunt default
# or
$ grunt check watch
For add new dependencies
$ npm install needed-package --save
For running your tests need
$ npm test
#or
$ grunt check
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
MIT
If you have any problems, catch the bug or have any suggestion - please find an existing issue or create new