From 9674d676936ae35cb8ace87371040d80e23e341c Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Wed, 23 Mar 2016 10:10:38 -0600 Subject: [PATCH] add opt-in githook to config --- .gitignore | 2 ++ package.json | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2308a958a..6eb2db876 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ lodash.compat.min.js coverage node_modules +.opt-in +.opt-out diff --git a/package.json b/package.json index 8fd5b4b14..343001830 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,13 @@ "dojo": "^1.11.0", "ecstatic": "^1.4.0", "fs-extra": "~0.26.7", + "ghooks": "1.0.3", "glob": "^7.0.3", "istanbul": "0.4.2", "jquery": "^2.2.2", "jscs": "^2.11.0", "lodash": "4.5.0", + "opt-cli": "1.1.1", "platform": "^1.3.1", "qunit-extras": "^1.5.0", "qunitjs": "~1.22.0", @@ -46,6 +48,12 @@ "style:test": "jscs test/*.js test/**/*.js", "test": "npm run test:main && npm run test:fp", "test:fp": "node test/test-fp", - "test:main": "node test/test" + "test:main": "node test/test", + "validate": "npm run style & npm run test" + }, + "config": { + "ghooks": { + "pre-push": "opt --in pre-push --exec \"npm run validate\"" + } } }