1.7.0 • Published 6 years ago

cccisd-package v1.7.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

cccisd-package

cccisd-package provides you with a development environment for npm package. It includes building, linting and testing.

Installation

Use "cccisd-update-package" from "cccisd-scripts" package (http://git.3cisd.corp/react-components/cccisd-scripts)

Usage

You should put your code into src folder. You can use es6, react there.

If you use react-storybook you should put your stories into stories folder on the same level as src folder.

Building

There will be run building script before "npm publish" automatically. It will transpile es6, react code into plain javascript and put it into dist folder.

Linting

You will be shown linting errors before commiting the code automatically

Testing

Tests will be run before commiting the code automatically

You can write your tests using "jest" framework (https://facebook.github.io/jest/). In a nutshell, you have to create files which ends with ".test.js". And this files should contain test code, like this:

it('Should sum two numbers', () => {
    expect(2 + 2).toBe(4);
});