Adding Husky to avoid forgetting to build GitHub action

This commit is contained in:
Julien Lengrand-Lambert
2023-03-08 11:58:23 +01:00
parent bb0ac9191d
commit c3a39d7b21
3 changed files with 34 additions and 1 deletions

5
.husky/pre-commit Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
#npm test
npm run build

24
package-lock.json generated
View File

@@ -13,6 +13,9 @@
"@actions/github": "^5.1.1",
"@vercel/ncc": "^0.36.1",
"dotenv": "^16.0.3"
},
"devDependencies": {
"husky": "^8.0.0"
}
},
"node_modules/@actions/core": {
@@ -170,6 +173,21 @@
"node": ">=12"
}
},
"node_modules/husky": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz",
"integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==",
"dev": true,
"bin": {
"husky": "lib/bin.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
@@ -395,6 +413,12 @@
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz",
"integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ=="
},
"husky": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz",
"integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==",
"dev": true
},
"is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",

View File

@@ -6,7 +6,8 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"local": "node localRun.js",
"build": "ncc build index.js --license licenses.txt"
"build": "ncc build index.js --license licenses.txt",
"prepare": "husky install"
},
"repository": {
"type": "git",
@@ -24,5 +25,8 @@
"@actions/github": "^5.1.1",
"@vercel/ncc": "^0.36.1",
"dotenv": "^16.0.3"
},
"devDependencies": {
"husky": "^8.0.0"
}
}