-
Notifications
You must be signed in to change notification settings - Fork 28
Advanced tasks
Christophe Rosset edited this page Apr 8, 2016
·
6 revisions
The main tasks are already exposed in the README. Since the v3.0.0, the project follows the same development & build workflow as topheman/webpack-babel-starter (you should check it out if you want to know more).
Here are some specifics to this projects:
###Test tasks
-
npm test
: Basic test command, linting & unit-testing the source code -
npm run karma
: Only launches unit tests -
npm run karma-watch
: Runs unit tests in continue (useful when writing unit tests) -
npm run karma-coverage
: Runs unit tests & outputs code coverage inbuild/reports/coverage
-
npm run mocha
: Runs unit tests directly through mocha -
npm run mocha-watch
: Runs unit tests directly through mocha in continue -
npm run lint
: Lints the source code -
npm run lint-watch
: Lints the source code in continue (useful when you're fixing lots of linting errors) -
npm run test-e2e
: launches end to end tests via protractor (by default on your current webpack dev server launched in mock mode)
###Configuration tasks
-
npm run generate-http-fixtures
: Will generate./test/fixtures/http.json
files, via nock, which will be used in mock mode (you shouldn't use it, you will change the data on which the tests are based) -
npm run webdriver-manager-update
: Shortcut to./node_modules/.bin/webdriver-manager update
(triggered atnpm postinstall
to retrieve the latest webdriver for selenium)
###Environment variables
-
NODE_ENV
: by default todevelopment
:-
development
: You'll have sourcemaps, more infos via the console for debugging -
mock
: All http requests will be mocked (used for unit/e2e tests) -
production
: Minification, optimization, cache invalidation ...
-
-
DEVTOOLS
: Includes the redux-devtools if set totrue
-
API_ROOT_URL
: Allows you to change the url of the github API (if you go through a proxy like topheman-apis-proxy) -
LINTER
: Disables linter when set tofalse
(by default attrue
)