Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 3 KB

CONTRIBUTING.md

File metadata and controls

79 lines (54 loc) · 3 KB

Contributing

Issues

Feel free to open an issue, or propose a pull request. To prevent duplication, please look at existing issues before posting a new one.

TL;DR

Command Description
npm test Runs test suite once using Jest.
npm start Runs test once, watch for changes in dev/test files, then re-runs tests automatically when a file changes.
npm run lint Runs ESLint linter.

Getting started

Step 1. Checkout repository

Prerequisites: you need to have git, node (>=6) and npm installed.

git clone https://github.com/demvsystems/fuzzy-date.git

(or your clone's Git URL)

Step 2. Install NPM dependencies

npm install

Step 3. Run tests (run-once mode)

npm test
> jest

 PASS  specs/lib/index.spec.js
  myModule
    ✓ exists (4ms)
    ✓ returns true

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        0.558s, estimated 1s
Ran all test suites.

Note: Use npm test -- --coverage to generate code coverage report in the coverage directory, and open coverage/index.html to view full HTML report.

Step 4. Run tests (TDD mode)

npm start

Coding standards

This project follows Airbnb Javascript Style Guide. It is enforced at build time by ESLint.

npm lint

Note: this is automatically run before the test suite by npm test, but not by npm start

Other commands

Command Description
npm run doc Generates API documentation in esdoc folder. Not expected to be run manually, since ESDoc hosting service runs it already.
npm run build Transpile all files from src directory to dist, using Babel. Not expected to be run manually, since it is automatically run before NPM packaging (package.json's prepublishOnly script).