1 | const chalk = require(`chalk`);
|
2 |
|
3 | const showSuccessMessage = () => {
|
4 | console.log(chalk.green(`Success!\n`));
|
5 | console.log(chalk.cyan(`Welcome to the Gatsby CLI! Please visit `) +
|
6 | chalk.underline(`https://www.gatsbyjs.org/docs/gatsby-cli/`) +
|
7 | chalk.cyan(` for more information.\n`));
|
8 | }
|
9 |
|
10 | try {
|
11 |
|
12 | const npmArgs = JSON.parse(process.env[`npm_config_argv`]);
|
13 | if (npmArgs.cooked && npmArgs.cooked.includes(`--global`)) {
|
14 | const createCli = require(`../lib/create-cli`);
|
15 | showSuccessMessage();
|
16 | createCli(`--help`);
|
17 | }
|
18 | } catch (e) {
|
19 | }
|