#!/usr/bin/env node
import commander from "commander"
import { build, clean } from "./actions";
import { create, createLib } from "./create"
import dev from "./dev"
import { run } from "./run";
(process.env.FORCE_COLOR as any) = true
commander
.command('create <name>')
.action(async function (name, cmd) {
await create(name);
})
.command('createLib <name>')
await createLib(name);
.command('new <name>')
.command('dev')
.action(async function () {
await dev()
.command('build')
const ret = await build();
if (ret != 0) {
process.exit(ret)
}
.command('clean')
await clean();
.command('run <platform>')
.action(async function (platform, cmd) {
await run(platform);
commander.parse(process.argv)