generator-node-tdd
v0.3.0
Published
A boilerplate for NodeJS projects with Mocha and Babel
Downloads
2
Maintainers
Readme
generator-node-tdd
A boilerplate for NodeJS projects with Mocha and Babel
Boilerplate
The posible structures of the boilerplate are the following ones:
.
├── dist
│ ├── lib
│ │ └── logger.js
│ └── index.js
├── Dockerfile
├── node_modules
├── package.json
├── package-lock.json
├── src
│ ├── lib
│ │ └── logger.js
│ └── index.js
└── test
└── basic.test.js
.
├── dist
│ ├── lib
│ │ └── logger.js
│ ├── basic.test.js
│ └── index.js
├── Dockerfile
├── node_modules
├── package.json
├── package-lock.json
└── src
├── lib
│ └── logger.js
├── basic.test.js
└── index.js
And these are the scripts from the package.json
:
"scripts": {
"start": "node dist/index.js",
"start:babel": "babel-node src/index.js",
"test": "mocha --ui tdd --require babel-core/register 'test/**/*.test.js'",
"tdd": "npm test -- --watch",
"build": "babel src -d dist",
"dev": "nodemon --watch src --exec babel-node src/index.js"
},
Installation
First, install Yeoman and generator-node-tdd using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-node-tdd
Then generate your new project:
yo node-tdd
or let Yeoman to create the project directory:
yo node-tdd my-project
Getting To Know Yeoman
- Yeoman has a heart of gold.
- Yeoman is a person with feelings and opinions, but is very easy to work with.
- Yeoman can be too opinionated at times but is easily convinced not to be.
- Feel free to learn more about Yeoman.
License
MIT © Ulises Santana