Skip to content

Commit

Permalink
show a message on postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed May 19, 2019
1 parent 40df8cf commit 1d77ba0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
##### 2.6.6 [LEGACY]
- Fixed IE8- non-enumerable properties support in `Object.{ assign, entries, values }`, [#541](https://github.com/zloirock/core-js/issues/541)
- Fixed support of primitives in `Object.getOwnPropertySymbols` in Chrome 38 / 39, [#539](https://github.com/zloirock/core-js/issues/539)
- Show a message on `postinstall`

##### 2.6.5 - 2019.02.15
- Fixed buggy `String#padStart` and `String#padEnd` mobile Safari implementations, [#414](https://github.com/zloirock/core-js/issues/414).
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"lint": "eslint ./",
"promises-tests": "promises-aplus-tests tests/promises-aplus/adapter",
"observables-tests": "node tests/observables/adapter && node tests/observables/adapter-library",
"test": "npm run grunt clean copy && npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && lsc tests/commonjs"
"test": "npm run grunt clean copy && npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && lsc tests/commonjs",
"postinstall": "node scripts/postinstall"
},
"license": "MIT",
"keywords": [
Expand Down
12 changes: 12 additions & 0 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable no-console,max-len */
var env = process.env;
var CI = !!env.CI && env.CI !== '0' && env.CI !== 'false';
var SILENT = !!~['silent', 'error', 'warn'].indexOf(env.npm_config_loglevel);

if (!CI && !SILENT) {
console.log('\u001B[96mThank you for using core-js (\u001B[94mhttps://github.com/zloirock/core-js\u001B[96m)!\u001B[0m\n');
console.log('\u001B[96mPlease consider supporting of core-js on Open Collective or Patreon:\u001B[0m');
console.log('\u001B[96m> \u001B[94mhttps://opencollective.com/core-js\u001B[0m');
console.log('\u001B[96m> \u001B[94mhttps://www.patreon.com/zloirock\u001B[0m\n');
console.log('\u001B[96mAlso, the author of core-js (\u001B[94mhttps://github.com/zloirock\u001B[96m) is looking for a good job -)\u001B[0m\n');
}

0 comments on commit 1d77ba0

Please sign in to comment.