update npm packages
This commit is contained in:
@@ -0,0 +1 @@
|
||||
_
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
PURPLE='\033[0;35m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
. "${VIRTUAL_ENV}/bin/activate"
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
printf "${PURPLE}Failed to find virtualenv. Skipping pre-push hook.\n${NC}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
printf "${PURPLE}Running pre-push tests.${NC}\n"
|
||||
printf "${PURPLE}npm tests...${NC}\n"
|
||||
npm test
|
||||
printf "${PURPLE}pycodestyle tests...${NC}\n"
|
||||
pycodestyle .
|
||||
printf "${PURPLE}unit tests...${NC}\n"
|
||||
python -Wall manage.py test --noinput
|
||||
set +e
|
||||
|
||||
printf "${PURPLE}Tests passed.${NC}\n"
|
||||
Generated
+2284
-3309
File diff suppressed because it is too large
Load Diff
+8
-12
@@ -7,7 +7,8 @@
|
||||
"lint:js": "eslint .",
|
||||
"lint:md": "remark .",
|
||||
"lint:py": "pycodestyle --config=setup.cfg --count .",
|
||||
"lint:py-type": "pyright"
|
||||
"lint:py-type": "pyright",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -16,21 +17,16 @@
|
||||
"author": "SIK ry",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"eslint": "3.19.0",
|
||||
"husky": "4.2.5",
|
||||
"npm-run-all": "4.1.5",
|
||||
"pyright": "1.1.42",
|
||||
"remark-cli": "7.0.0",
|
||||
"remark-preset-lint-recommended": "3.0.3"
|
||||
"eslint": "^7.23.0",
|
||||
"husky": "^5.2.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pyright": "^1.1.126",
|
||||
"remark-cli": "^9.0.0",
|
||||
"remark-preset-lint-recommended": "^5.0.0"
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"remark-preset-lint-recommended"
|
||||
]
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-push": "npm run lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user