1 | const boxen = require(`boxen`)
|
2 |
|
3 | const defaultConfig = {
|
4 | padding: 1,
|
5 | borderColor: `blue`,
|
6 | borderStyle: `double`,
|
7 | }
|
8 |
|
9 | const defaultMessage =
|
10 | `Gatsby has started collecting anonymous usage analytics\n` +
|
11 | `to help improve Gatsby for all users.\n` +
|
12 | `\n` +
|
13 | `If you'd like to opt-out, you can use \`gatsby telemetry --disable\`\n` +
|
14 | `To learn more, checkout https://gatsby.dev/telemetry`
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | const showAnalyticsNotification = (
|
22 | config = defaultConfig,
|
23 | message = defaultMessage
|
24 | ) => {
|
25 | console.log(boxen(message, config))
|
26 | }
|
27 |
|
28 | module.exports = showAnalyticsNotification
|