1
0
Fork 0
mirror of synced 2024-07-09 08:16:34 +12:00
budibase/packages/cli/src/cli.js

21 lines
547 B
JavaScript
Raw Normal View History

2019-10-12 05:14:23 +13:00
const yargs = require("yargs");
const chalk = require("chalk");
module.exports = () => {
2019-10-12 19:50:32 +13:00
yargs
.scriptName("budi")
.usage('$0 <cmd> [args]')
.command(require("./commands/init"))
.command(require("./commands/new"))
.command(require("./commands/run"))
.command(require("./commands/instance"))
.fail((msg, err) => {
if(err) {
console.log(chalk.red(err.message));
console.log(chalk.gray(err.toString()));
} else {
console.log(chalk.red(msg));
}
})
.help().argv;
2019-10-12 05:14:23 +13:00
}