chore(): start moving some packages to the core directory (#7215)
This commit is contained in:
committed by
GitHub
parent
fdee748eed
commit
bbccd6481d
16
packages/cli/medusa-cli/scripts/postinstall.js
Normal file
16
packages/cli/medusa-cli/scripts/postinstall.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const chalk = require(`chalk`)
|
||||
|
||||
const showSuccessMessage = () => {
|
||||
console.log(chalk.green(`Success!\n`))
|
||||
console.log(chalk.cyan(`Welcome to the Medusa CLI!`))
|
||||
}
|
||||
|
||||
try {
|
||||
// check if it's a global installation of medusa-cli
|
||||
const npmArgs = JSON.parse(process.env[`npm_config_argv`])
|
||||
if (npmArgs.cooked && npmArgs.cooked.includes(`--global`)) {
|
||||
const createCli = require(`../dist/create-cli`)
|
||||
showSuccessMessage()
|
||||
createCli(`--help`)
|
||||
}
|
||||
} catch (e) {}
|
||||
Reference in New Issue
Block a user