mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 01:35:17 +01:00
26 lines
475 B
JavaScript
26 lines
475 B
JavaScript
#!/usr/bin/env node
|
|
|
|
require('dotenv').config();
|
|
const yargs = require('yargs');
|
|
const chalk = require('chalk');
|
|
const createAccount = require('./create-account');
|
|
|
|
const cmd = yargs.usage('Usage: umami <command> [arguments]').help('h').alias('h', 'help');
|
|
|
|
const { argv } = cmd;
|
|
const {
|
|
_: [action, ...params],
|
|
} = argv;
|
|
|
|
const exec = async () => {
|
|
if (action === 'create') {
|
|
await createAccount();
|
|
} else {
|
|
cmd.showHelp();
|
|
}
|
|
|
|
process.exit(0);
|
|
};
|
|
|
|
exec();
|