This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-cli/src/index.ts

33 lines
687 B
TypeScript
Raw Normal View History

#!/usr/bin/env node
import commander from "commander"
2021-02-05 16:35:52 +08:00
import { build, clean } from "./actions";
import create from "./create"
2021-02-05 18:20:42 +08:00
import dev from "./dev"
commander
.command('create <name>')
.action(async function (name, cmd) {
await create(name);
})
commander
.command('new <name>')
.action(async function (name, cmd) {
await create(name);
})
commander
.command('dev')
2021-02-05 18:20:42 +08:00
.action(async function () {
await dev()
})
commander
.command('build')
2021-02-05 16:35:52 +08:00
.action(async function () {
await build();
})
commander
.command('clean')
2021-02-05 16:35:52 +08:00
.action(async function () {
await clean();
})
commander.parse(process.argv)