Skip to content

Commit

Permalink
Reduce noisy NPM output from postinstall script
Browse files Browse the repository at this point in the history
Basically just replaces this
> sinon@4.4.6 postinstall /home/carlerik/dev/sinon
> node -e "console.log('\u001b[32mLove sinon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/sinon/donate\u001b[0m\n')" || exit 0

with this
> sinon@4.4.6 postinstall /home/carlerik/dev/sinon
> node scripts/support-sinon.js
  • Loading branch information
fatso83 authored and mroderick committed Mar 21, 2018
1 parent 988df0c commit 1f33fe5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -33,7 +33,7 @@
"prepublishOnly": "npm run build",
"preversion": "./scripts/preversion.sh",
"postversion": "./scripts/postversion.sh",
"postinstall": "node -e \"console.log('\\u001b[32mLove sinon? You can now support the project via the open collective:\\u001b[22m\\u001b[39m\\n > \\u001b[96m\\u001b[1mhttps://opencollective.com/sinon/donate\\u001b[0m\\n')\" || exit 0"
"postinstall": "node scripts/support-sinon.js"
},
"lint-staged": {
"*.js": "eslint",
Expand Down
6 changes: 6 additions & 0 deletions scripts/support-sinon.js
@@ -0,0 +1,6 @@
"use strict";
/* eslint-disable no-console */
console.log(
"\u001b[32mLove sinon? You can now support the project via the open collective:" +
"\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/sinon/donate\u001b[0m\n"
);

0 comments on commit 1f33fe5

Please sign in to comment.