config: add pre-push hook (including linting and testing)
This commit is contained in:
parent
35f940ab7e
commit
8038525ad0
|
@ -14,6 +14,7 @@
|
||||||
"watch": "gulp build --watch --dev",
|
"watch": "gulp build --watch --dev",
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"test": "mocha",
|
"test": "mocha",
|
||||||
|
"lint": "npm run eslint && npm run tslint",
|
||||||
"eslint-check": "eslint --print-config gulpfile.js | eslint-config-prettier-check",
|
"eslint-check": "eslint --print-config gulpfile.js | eslint-config-prettier-check",
|
||||||
"eslint": "eslint .",
|
"eslint": "eslint .",
|
||||||
"tslint-check": "tslint-config-prettier-check ./tslint.json",
|
"tslint-check": "tslint-config-prettier-check ./tslint.json",
|
||||||
|
@ -23,7 +24,8 @@
|
||||||
"forge:start": "electron-forge start",
|
"forge:start": "electron-forge start",
|
||||||
"forge:make": "electron-forge --platform win32 --arch x64 make",
|
"forge:make": "electron-forge --platform win32 --arch x64 make",
|
||||||
"forge": "npm run build && npm run forge:make",
|
"forge": "npm run build && npm run forge:make",
|
||||||
"precommit": "npm run prettier:write && npm run eslint-check && npm run tslint-check"
|
"precommit": "npm run prettier:write && npm run eslint-check && npm run tslint-check",
|
||||||
|
"prepush": "npm run lint && npm run test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsdom": "^15.1.1",
|
"jsdom": "^15.1.1",
|
||||||
|
@ -72,7 +74,8 @@
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "npm run precommit"
|
"pre-commit": "npm run precommit",
|
||||||
|
"pre-push": "npm run prepush"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue