Contributing to smartbanner.js
If you want to build
smartbanner.js from source, you have to install the required dependencies first:
$ npm i
Afterwards, you can generate distribution files in
dist/ from source by running:
$ npm run build
To run all unit tests, execute:
$ npm test
To run single specs, execute as per file, e.g.:
$ npm run mocha test/spec/smartbanner_spec.js
ATTENTION: in order to get Pull Requests merged and released faster, please ensure Code Coverage of smartbanner.js remains positive and does not drop!
If some of the files do not pass linters, build will fail.
Pull Requests will only be accepted if build succeeds.
$ npm run eslint
smartbanner.js locally, e.g. for testing:
$ npm start
- Access at http://127.0.0.1:8080
- Switch browser to mobile User Agent, e.g. iPhone