File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ After cloning the repo, run:
5959$ npm install
6060```
6161
62+ If you are on a Unix-like system, optionally install the Git pre-commit hook with:
63+
64+ ``` bash
65+ $ npm run install:hooks
66+ ```
67+
68+ This will run Flow and ESLint on changed files before each commit.
69+
6270### Commonly used NPM scripts
6371
6472``` bash
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ files_to_lint=$( git diff --cached --name-only --diff-filter=ACM | grep ' \.js$' )
4+
5+ if [ -n " $files_to_lint " ]; then
6+ flow && NODE_ENV=production eslint $files_to_lint
7+ fi
Original file line number Diff line number Diff line change 4242 "sauce" : " SAUCE=true karma start build/karma.sauce.config.js" ,
4343 "bench:ssr" : " npm run build:ssr && NODE_ENV=production node benchmarks/ssr/renderToString.js && NODE_ENV=production VUE_ENV=server node benchmarks/ssr/renderToStream.js" ,
4444 "release" : " bash build/release.sh" ,
45- "release:weex" : " bash build/release-weex.sh"
45+ "release:weex" : " bash build/release-weex.sh" ,
46+ "install:hooks" : " ln -fs ../../build/git-hooks/pre-commit .git/hooks/pre-commit"
4647 },
4748 "repository" : {
4849 "type" : " git" ,
You can’t perform that action at this time.
0 commit comments