Skip to content

Latest commit

 

History

History
88 lines (57 loc) · 2.7 KB

CONTRIBUTING.md

File metadata and controls

88 lines (57 loc) · 2.7 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 Mocha. Generates code coverage report in the coverage directory (run open coverage/index.html to view full HTML report).
npm start Runs test once, watch for changes in dev/test files, then re-runs tests automatically when a file changes.
Note: as opposed as npm test, it doesn't generate a code coverage report.
npm run lint Runs ESLint linter.
Note: this is automatically run before the test suite by npm test, but not by npm start.
npm transpile Transpile all files from src directory to dist, using Babel.
Note: this is not expected to be run manually since it is automatically run before NPM packaging (package.json's prepublish script).

Getting started

Step 1. Checkout repository

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

git clone https://github.com/amercier/karma-scss-preprocessor.git

(or your clone's Git URL)

Step 2. Install NPM dependencies

npm install

Step 3. Run tests (run-once mode)

npm test
> karma-scss-preprocessor@0.1.0-alpha.2 test /.../karma-scss-preprocessor
> npm run lint && rm -rf coverage && istanbul cover _mocha -- specs --recursive --compilers js:babel-register


> karma-scss-preprocessor@0.1.0-alpha.2 lint /.../karma-scss-preprocessor
> eslint .



  myModule
    ✓ exists
    ✓ is true


  2 passing (21ms)


----------|----------|----------|----------|----------|----------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files |      100 |      100 |      100 |      100 |                |
 index.js |      100 |      100 |      100 |      100 |                |
----------|----------|----------|----------|----------|----------------|

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.

License

ISC © Alex Mercier (see LICENSE.md).