0.1.3 • Published 7 years ago

base-module v0.1.3

Weekly downloads
10
License
MIT
Repository
-
Last release
7 years ago

Base Module

Use this Base Module to create your own NPM module.

Features

  • Linting according Airbnb JavaScript Style Guide
  • Support and compilation of ES6 code
  • Unit tests with Mocha, Chai and Sinon
  • Test coverage check with Istanbul / NYC

Workflow

Preparation

  1. Install Node.js
  2. Install Atom text editor
  3. Install Atom package linter-eslint and its dependencies

Setup

  1. Get available module name by testing https://www.npmjs.com/package/<module-name>
  2. Create module folder with mkdir <module-name>
  3. Open module folder with cd <module-name>
  4. Create empty package.json file with echo '{}' > package.json
  5. Install Base Module with npm install --save-dev base-module

Development

Testing

  • Run npm test to run all tests once
    • Run npm run test-eslint to run code tests once
    • Run npm run test-mocha to run unit tests once
    • Run npm run test-mocha-watch to run continuous unit tests
      • Run CTRL + C to stop the continuous unit tests

Compiling

  • Run npm run build to compile ES6 code to ES5 code in folder lib