From 08be4d0cc16d27841b80dce1e943d8f0ad8e0bc9 Mon Sep 17 00:00:00 2001 From: Marcy Sutton Date: Mon, 11 Sep 2017 15:31:09 -0700 Subject: [PATCH] chore: fiddle with postinstall for windows Closes https://github.com/dequelabs/axe-core/issues/516 --- build/utils/clean-postinstall.js | 3 +++ build/utils/restore-postinstall.js | 3 +++ package.json | 7 +++++-- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 build/utils/clean-postinstall.js create mode 100644 build/utils/restore-postinstall.js diff --git a/build/utils/clean-postinstall.js b/build/utils/clean-postinstall.js new file mode 100644 index 0000000000..f48b462b5d --- /dev/null +++ b/build/utils/clean-postinstall.js @@ -0,0 +1,3 @@ +let manifest = require('package.json') + +manifest.scripts.postinstall = "" \ No newline at end of file diff --git a/build/utils/restore-postinstall.js b/build/utils/restore-postinstall.js new file mode 100644 index 0000000000..1900393134 --- /dev/null +++ b/build/utils/restore-postinstall.js @@ -0,0 +1,3 @@ +let manifest = require('package.json') + +manifest.scripts.postinstall = "./bin/postinstall.sh" \ No newline at end of file diff --git a/package.json b/package.json index d655555def..4631f8eca9 100644 --- a/package.json +++ b/package.json @@ -51,9 +51,12 @@ "test": "grunt test", "test-fast": "grunt test-fast", "version": "node build/sri-update", - "prepublishOnly": "grunt build && node build/sri-update --validate", + "prepublishOnly": "grunt build && node build/sri-update --validate && clean-postinstall", + "postpublish": "restore-postinstall", "postinstall": "./bin/postinstall.sh", - "release": "standard-version" + "release": "standard-version", + "clean-postinstall": "node build/utils/clean-postinstall.js", + "restore-postinstall": "node build/utils/restore-postinstall.js" }, "devDependencies": { "angular-precommit": "^1.0.3",