From 217b714cc66c1c08db30e06f79893f255676ea5c Mon Sep 17 00:00:00 2001 From: sibiraj-s Date: Mon, 1 Mar 2021 08:38:31 +0530 Subject: [PATCH] chore: update prepare script --- package-lock.json | 15 --------------- package.json | 3 +-- scripts/install-husky.sh | 9 +++++++++ 3 files changed, 10 insertions(+), 17 deletions(-) create mode 100644 scripts/install-husky.sh diff --git a/package-lock.json b/package-lock.json index a6dc503e..6d99203c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4272,12 +4272,6 @@ } } }, - "ci-info": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.1.1.tgz", - "integrity": "sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==", - "dev": true - }, "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", @@ -8934,15 +8928,6 @@ "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", "dev": true }, - "is-ci": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", - "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", - "dev": true, - "requires": { - "ci-info": "^3.1.1" - } - }, "is-color-stop": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", diff --git a/package.json b/package.json index 6cf915b0..b9846d76 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "test:lib": "ng test ngx-editor --browsers ChromeHeadless --watch false", "test": "npm run test:lib && npm run test:demo", "dev": "ng build ngx-editor --watch", - "prepare": "is-ci || husky install" + "prepare": "sh ./scripts/install-husky.sh" }, "keywords": [ "angular-editor", @@ -68,7 +68,6 @@ "gh-pages": "^3.1.0", "husky": "^5.1.2", "inquirer": "^8.0.0", - "is-ci": "^3.0.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.1.0", diff --git a/scripts/install-husky.sh b/scripts/install-husky.sh new file mode 100644 index 00000000..22a49329 --- /dev/null +++ b/scripts/install-husky.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ -n "$CI" ] +then + echo "Found CI. Skipping husky install...\n" + exit 0 +fi + +npx --no-install husky install