0.1.4 • Published 8 years ago

plop-node-express v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

Plop Node + Express generator

Plop generator for Node + Express apps coding in ES6.

Requirements

The first requirement is to have isntalled Node.

Then install Plop globally $ npm install -g plop.

Usage

First, you should install the generator: $ npm install plop-node-express.

Create in the root of your project a plopfile.js with this content:

module.exports = require('plop-node-express');

In the terminal, type: $ plop, this will be execute the generator.

Before start to develop, remember to install all the dependencies: $ npm install.

Provided generator

The generator provides a fresh starting point for Node + Express project:

  • NPM as a package manager and a task runner.
  • Babel as a transpiler. I use to work in ES6.
  • ESLint as a linter.
  • Mocha as a test framework, with Chai as assertion library and Chai-http as an extension for testing HTTP APIs.

Commands available:

CommandAction
eslintRun ESLint on src/ directory.
testRun test framework.
devRun the compilation (with Babel ) and a nodemon that restarts node at any change in the code.
buildRun eslint task, test task, compile the code and output it at dist/ dir.
startRun build task and start the app.

To run a command: $ npm run <command>.