From 2627b553b11c3989c08f842d92468bb3e1857dff Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Tue, 16 Feb 2021 11:39:23 +0530 Subject: [PATCH] update husky config to v5 --- .husky/.gitignore | 1 + .husky/pre-push | 4 ++++ .huskyrc.json | 6 ------ package.json | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 .husky/.gitignore create mode 100755 .husky/pre-push delete mode 100644 .huskyrc.json diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 00000000..c9cdc63b --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 00000000..37049f77 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn test \ No newline at end of file diff --git a/.huskyrc.json b/.huskyrc.json deleted file mode 100644 index 96a97ffa..00000000 --- a/.huskyrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/huskyrc", - "hooks": { - "pre-push": "yarn test" - } -} diff --git a/package.json b/package.json index c3d05c26..a784b796 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test:unit": "ava", "test:unit:watch": "yarn run test:unit -- --watch", "test:spectron": "ava --config ava-spectron.config.js", - "postinstall": "webpack --config-name hyper-app && electron-builder install-app-deps && yarn run rebuild-node-pty && cpy --cwd=target --parents \"node_modules/**/*\" \"../app/\"", + "postinstall": "webpack --config-name hyper-app && electron-builder install-app-deps && yarn run rebuild-node-pty && cpy --cwd=target --parents \"node_modules/**/*\" \"../app/\" && husky install", "rebuild-node-pty": "electron-rebuild -f -w target/node_modules/node-pty -m target", "dist": "yarn run build && cross-env BABEL_ENV=production babel target/renderer/bundle.js --out-file target/renderer/bundle.js --no-comments --minified && electron-builder", "clean": "node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer"