Complete open-source nodeJs library development process
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)
- Enter git repository
(default: will use from existing file ./.git/config or empty)
- Add Travis-CI?
- Add Coverals.io?
- Test Engine
- CodeFormat: indent type
- CodeFormat: indent size
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
Usage generated library
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
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
If you have any problems, catch the bug or have any suggestion - please find an existing issue or create new