mediawiki-extensions-Popups/package.json
joakin a480b997d4 Tools: Add pre-commit git hook to auto test and build
That way before commits it will run tests and add compiled sources
automatically removing some of the pain of having to commit the compiled
assets for now.

Additional changes:
* Extract npm test:dev from npm test to run lint and tests without the
  CI check (to be re-used in the pre-commit hook)

Bug: T160061
Change-Id: I6e1201ef7dae5fef34b14cabc0292fb1aa4e5997
2017-05-11 10:37:48 +02:00

34 lines
1.3 KiB
JSON

{
"private": true,
"scripts": {
"start": "webpack -w",
"build": "NODE_ENV=production webpack",
"test:node": "mw-node-qunit tests/node-qunit/*.js tests/node-qunit/**/*.js | tap-dot",
"test:dev": "grunt lint && npm run test:node",
"test": " npm run check-built-assets && npm run test:dev",
"doc": "jsduck",
"check-built-assets": "echo 'CHECKING BUILD SOURCES ARE COMMITED' && rm -rf test-build && mv resources/dist test-build && npm run build && diff -x '*.map' -r test-build resources/dist && rm -rf test-build",
"coverage": "istanbul cover node_modules/.bin/mw-node-qunit tests/node-qunit/*.js tests/node-qunit/**/*.js",
"precommit": "npm run test:dev && npm run build && git add resources/dist"
},
"devDependencies": {
"eslint-config-wikimedia": "0.4.0",
"grunt": "1.0.1",
"grunt-banana-checker": "0.5.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-eslint": "19.0.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "^0.6.0",
"husky": "^0.13.3",
"istanbul": "^0.4.5",
"mock-require": "^2.0.1",
"mw-node-qunit": "^1.0.6",
"redux": "3.6.0",
"redux-thunk": "2.2.0",
"stylelint-config-wikimedia": "0.4.1",
"tap-dot": "^1.0.5",
"webpack": "^2.2.1"
}
}