From 4ea1bc7998e78f0ac33112133913a73abab4fe62 Mon Sep 17 00:00:00 2001 From: Andrejs M Date: Thu, 24 Aug 2017 04:49:42 +0300 Subject: [PATCH] Move donation message to scripts (#804) * Move donation message to scripts this fixes issue where installation would fail in environments where `npm` is not available. * Move donation message to nodejs script * Move donation message script to config/ --- config/donation-message.js | 1 + package.json | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100755 config/donation-message.js diff --git a/config/donation-message.js b/config/donation-message.js new file mode 100755 index 0000000000..1c9cae3dba --- /dev/null +++ b/config/donation-message.js @@ -0,0 +1 @@ +console.log("\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[0m") diff --git a/package.json b/package.json index 8f3ffadb4b..10aeebe244 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "prepublish": "npm run build", "smart-release": "npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish", "release": "cross-env npm run smart-release", - "postinstall": "npm run -s donate", - "donate": "echo \"\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[39m\"" + "postinstall": "node ./config/donation-message.js" }, "eslintConfig": { "extends": "./config/eslint-config.js"