Raw
1 const chalk = require(`chalk`)
2
3 const showSuccessMessage = () => {
4 console.log(chalk.green(`Success!\n`))
5 console.log(chalk.cyan(`Welcome to the Medusa CLI!`))
6 }
7
8 try {
9 // check if it's a global installation of medusa-cli
10 const npmArgs = JSON.parse(process.env[`npm_config_argv`])
11 if (npmArgs.cooked && npmArgs.cooked.includes(`--global`)) {
12 const createCli = require(`../dist/create-cli`)
13 showSuccessMessage()
14 createCli(`--help`)
15 }
16 } catch (e) {}