generator-node-tdd

0.3.0 • Public • Published

generator-node-tdd NPM version Build Status Dependency Status Coverage percentage

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

Package Sidebar

Install

npm i generator-node-tdd

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

11.6 kB

Total Files

11

Last publish

Collaborators

  • ulisesantana