GitHub - diegohaz/nod: Node.js module generator/boilerplate with Babel, Jest, Fl...
source link: https://github.com/diegohaz/nod
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
nod
NodeJS module generator/boilerplate.
Features
- Babel - Write next generation JavaScript today;
- Jest - JavaScript testing framework used by Facebook;
- ESLint - Make sure you are writing a quality code;
- Prettier - Enforces a consistent style by parsing your code and re-printing it;
- Flow - A static type checker for JavaScript used heavily within Facebook;
- Travis CI - Automate tests and linting for every push or pull request;
- Documentation - A documentation system so good, you'll actually write documentation.
Install
The easiest way to use nod is through the Yeoman Generator.
$ npm install -g yo generator-nod $ yo nod
If you don't want to use the generator, you can also download or git clone
this repo
$ git clone https://github.com/diegohaz/nod my-module $ cd my-module $ rm -rf .git $ npm install # or yarn
Just make sure to edit package.json
, README.md
and LICENSE
files accordingly with your module's info.
Commands
$ npm test # run tests with Jest $ npm run coverage # run tests with coverage and open it on browser $ npm run lint # lint code $ npm run docs # generate docs $ npm run build # generate docs and transpile code $ npm run watch # watch code changes and run scripts automatically $ npm run patch # bump patch version and publish to npm e.g. 0.0.1 $ npm run minor # bump minor version and publish to npm e.g. 0.1.0 $ npm run major # bump major version and publish to npm e.g. 1.0.0
Built with Nod
You can use those modules as a reference when creating yours. If you have built something with Nod, send a PR (try to write a helpful description for Nod users).
- styled-tools - Module using
flow-typed
, targeted to browser. - styled-theme - Module with
gh-pages
, targeted to browser. - webpack-blocks-happypack - Uses Jest snapshots.
- webpack-blocks-split-vendor - Has peer dependencies.
API
Table of Contents
sayHello
This function says hello.
Parameters
name
string Some name to say hello for.
Returns string The hello.
License
MIT © Diego Haz
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK