Turn git-hook setup into post-install script

1. Don't have to think about them
2. Updates hooks autonmatically
This commit is contained in:
Basti 2019-05-22 10:38:10 +02:00
parent a028db0718
commit 698741ec09
No known key found for this signature in database
GPG Key ID: BE4634D632D39B67
3 changed files with 3 additions and 8 deletions

View File

@ -25,11 +25,6 @@ Each of the aragon apps are separate packages:
You can use `npm run install-all` to install all app dependencies at once.
We also recommend using our git hooks for linting staged files and other
convenient helpers. You can install them via:
$ npm run setup
### Local development chain
For local development it is recommended to use

View File

@ -8,6 +8,7 @@
},
"scripts": {
"install-all": "./scripts/every-app.sh \"npm install\"",
"postinstall": "sh scripts/git-hooks/install",
"build-json": "npm run compile-contracts && node ./scripts/build-json.js",
"repl": "truffle exec scripts/repl.js",
"seeds": "truffle exec scripts/seeds.js",
@ -23,8 +24,7 @@
"lint:contracts": "solhint \"contracts/**/*.sol\" \"apps/*/contracts/**/*.sol\"",
"lint:contract-tests": "eslint apps/*/test",
"lint:wrapper": "eslint lib/",
"test": "echo \"Error: no test specified\" && exit 1",
"setup": "sh scripts/git-hooks/install"
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",

View File

@ -1,2 +1,2 @@
#!/bin/sh
cp scripts/git-hooks/pre-commit .git/hooks
cp -f scripts/git-hooks/pre-commit .git/hooks