1 | var env = process.env;
|
2 | var ADBLOCK = is(env.ADBLOCK);
|
3 | var CI = is(env.CI);
|
4 | var COLOR = is(env.npm_config_color);
|
5 | var SILENT = !!~['silent', 'error', 'warn'].indexOf(env.npm_config_loglevel);
|
6 |
|
7 | function is(it) {
|
8 | return !!it && it !== '0' && it !== 'false';
|
9 | }
|
10 |
|
11 | function log(it) {
|
12 | console.log(COLOR ? it : it.replace(/\u001B\[\d+m/g, ''));
|
13 | }
|
14 |
|
15 | if (!ADBLOCK && !CI && !SILENT) {
|
16 | log('\u001B[96m🙌 Thank you for using 🍇 image2D (\u001B[94m https://github.com/yelloxing/image2D \u001B[96m) for Drawing Two-Dimensional Pictures!\u001B[0m\n');
|
17 | log('\u001B[96mThe project needs your help! Please consider supporting of image2D on github,the document is located in: \u001B[0m');
|
18 | log('\u001B[96m>\u001B[94m 📦 https://yelloxing.github.io/image2D \u001B[0m');
|
19 | log('\u001B[96m>\u001B[94m 📦 https://github.com/yelloxing/image2D/tree/master/docs \u001B[0m');
|
20 | log('\u001B[96m🚨 Also, the author of 🍇 image2D (\u001B[94m https://yelloxing.github.io/notebook/ \u001B[96m) is looking for a good time -)\u001B[0m\n');
|
21 | }
|