adding husky lately

This commit is contained in:
koudo 2022-01-08 01:10:16 +01:00
parent 4d6a635564
commit 02abb2e5f4
6 changed files with 35 additions and 147 deletions

4
.husky/pre-commit Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint

4
.husky/pre-push Normal file
View File

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

View File

@ -3,9 +3,10 @@
this phantom aim to search in the [marmiton](https://www.marmiton.org) website this phantom aim to search in the [marmiton](https://www.marmiton.org) website
## starting the project ## starting the project
checkout this repo and go to root directory checkout this repo and go to root directory
launch `npm i` launch `npm i`
launch `npm run test` to ensure all test pass launch `npm run test` to ensure all test pass

View File

@ -3,3 +3,19 @@ phantom-exo / [Modules](modules.md)
# Marmiton Search # Marmiton Search
this phantom aim to search in the [marmiton](https://www.marmiton.org) website this phantom aim to search in the [marmiton](https://www.marmiton.org) website
## starting the project
checkout this repo and go to root directory
launch `npm i`
launch `npm run test` to ensure all test pass
to auto-transpile launch `npm run watch`
to auto-deploy on build launch `npm run auto-deploy`
to test with online instance launch `npm run online`
want some [docs](./docs/modules.md) ?

151
package-lock.json generated
View File

@ -1378,12 +1378,6 @@
"integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==",
"dev": true "dev": true
}, },
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
},
"acorn": { "acorn": {
"version": "8.7.0", "version": "8.7.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
@ -1571,12 +1565,6 @@
"es-abstract": "^1.19.0" "es-abstract": "^1.19.0"
} }
}, },
"async": {
"version": "0.1.22",
"resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz",
"integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE=",
"dev": true
},
"asynckit": { "asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@ -1818,15 +1806,6 @@
"integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==",
"dev": true "dev": true
}, },
"cli": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/cli/-/cli-0.4.3.tgz",
"integrity": "sha1-5oGcjV+qlX9k+Y9mqFBiaMHR8X0=",
"dev": true,
"requires": {
"glob": ">= 3.1.4"
}
},
"cliui": { "cliui": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
@ -1943,11 +1922,6 @@
"which": "^2.0.1" "which": "^2.0.1"
} }
}, },
"crypto-browserify": {
"version": "git+https://github.com/dominictarr/crypto-browserify.git#95c5d50581ce0b4fff6e76e45dc0bb3622be4e9a",
"from": "git+https://github.com/dominictarr/crypto-browserify.git#95c5d505",
"dev": true
},
"cson": { "cson": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/cson/-/cson-3.0.2.tgz", "resolved": "https://registry.npmjs.org/cson/-/cson-3.0.2.tgz",
@ -3029,6 +3003,12 @@
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"dev": true "dev": true
}, },
"husky": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz",
"integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==",
"dev": true
},
"iconv-lite": { "iconv-lite": {
"version": "0.4.24", "version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@ -3986,33 +3966,6 @@
"integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
"dev": true "dev": true
}, },
"jshint": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/jshint/-/jshint-0.9.1.tgz",
"integrity": "sha1-/zLsfwn4QAH3SY7q/WPJ5Puy3A4=",
"dev": true,
"requires": {
"cli": "0.4.3",
"minimatch": "0.0.x"
},
"dependencies": {
"lru-cache": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-1.0.6.tgz",
"integrity": "sha1-qlD5cEdCKsclQ72hd6nJ0BjZhFI=",
"dev": true
},
"minimatch": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.0.5.tgz",
"integrity": "sha1-lrtJC707poNrv6wRGt91MBsVhN4=",
"dev": true,
"requires": {
"lru-cache": "~1.0.2"
}
}
}
},
"json-parse-better-errors": { "json-parse-better-errors": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
@ -4369,15 +4322,6 @@
"integrity": "sha512-cI6CHzivIFESe8djiK3Wh90CtWQBxLwMem8x8S+2GSvCvFgoMuOKVlfJtQ/2v3Afg3wOnHl/+tXotEs8z5vOrg==", "integrity": "sha512-cI6CHzivIFESe8djiK3Wh90CtWQBxLwMem8x8S+2GSvCvFgoMuOKVlfJtQ/2v3Afg3wOnHl/+tXotEs8z5vOrg==",
"dev": true "dev": true
}, },
"nopt": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
"integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
"dev": true,
"requires": {
"abbrev": "1"
}
},
"normalize-path": { "normalize-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
@ -4452,24 +4396,6 @@
"mimic-fn": "^2.1.0" "mimic-fn": "^2.1.0"
} }
}, },
"optimist": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.0.tgz",
"integrity": "sha1-aUJIJvNAX3nxQub8PZrljU27kgA=",
"dev": true,
"requires": {
"minimist": "~0.0.1",
"wordwrap": "~0.0.2"
},
"dependencies": {
"minimist": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
"dev": true
}
}
},
"optionator": { "optionator": {
"version": "0.9.1", "version": "0.9.1",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
@ -5347,65 +5273,6 @@
"strip-bom": "^3.0.0" "strip-bom": "^3.0.0"
} }
}, },
"tsdoc": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/tsdoc/-/tsdoc-0.0.4.tgz",
"integrity": "sha1-+xmixqjuYdVfrQjWgQRXGe9CvsM=",
"dev": true,
"requires": {
"jsdoc": "3.2.0",
"optimist": "0.6.0"
},
"dependencies": {
"catharsis": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.5.6.tgz",
"integrity": "sha1-IQoM+iPF0J+plNb6/hp2ODwXDLs=",
"dev": true
},
"js2xmlparser": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-0.1.0.tgz",
"integrity": "sha1-GwTWez95Ow47Rvr26pxO9tnn8WI=",
"dev": true
},
"jsdoc": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.2.0.tgz",
"integrity": "sha1-bziez4i18SZixR3eKZj1JkF4C8Q=",
"dev": true,
"requires": {
"async": "0.1.22",
"catharsis": "0.5.6",
"crypto-browserify": "git+https://github.com/dominictarr/crypto-browserify.git#95c5d505",
"js2xmlparser": "0.1.0",
"jshint": "0.9.1",
"markdown": "git+https://github.com/jsdoc3/markdown-js.git",
"marked": "0.2.8",
"taffydb": "git+https://github.com/hegemonic/taffydb.git",
"underscore": "1.4.2",
"wrench": "1.3.9"
}
},
"marked": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.2.8.tgz",
"integrity": "sha1-3dvMOO2BgraAqvnXzrvntiSXYHE=",
"dev": true
},
"taffydb": {
"version": "git+https://github.com/hegemonic/taffydb.git#e41b5e179e197bb85c5fb887b707672b1e5ca079",
"from": "git+https://github.com/hegemonic/taffydb.git",
"dev": true
},
"underscore": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.2.tgz",
"integrity": "sha1-yyquanmZqJ/VWq7nW84DEWmM6/s=",
"dev": true
}
}
},
"tslib": { "tslib": {
"version": "1.14.1", "version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
@ -5804,12 +5671,6 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true "dev": true
}, },
"wrench": {
"version": "1.3.9",
"resolved": "https://registry.npmjs.org/wrench/-/wrench-1.3.9.tgz",
"integrity": "sha1-bxPsNRRTF+spLKX2UxORskQRFBE=",
"dev": true
},
"write-file-atomic": { "write-file-atomic": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",

View File

@ -10,7 +10,8 @@
"watch": "webpack --watch", "watch": "webpack --watch",
"auto-deploy": "phantombuster", "auto-deploy": "phantombuster",
"online": "ts-node ./scripts/test_online.ts", "online": "ts-node ./scripts/test_online.ts",
"doc": "typedoc" "doc": "typedoc && npm run lint:fix",
"prepare": "husky install"
}, },
"engines": { "engines": {
"node": "14.x" "node": "14.x"
@ -35,6 +36,7 @@
"eslint-plugin-jest": "^25.3.4", "eslint-plugin-jest": "^25.3.4",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"husky": "^7.0.4",
"jest": "^27.4.7", "jest": "^27.4.7",
"jsdoc": "^3.6.7", "jsdoc": "^3.6.7",
"path": "^0.12.7", "path": "^0.12.7",