mcfly/packages/core/cli/index.js
Ayo Ayco 73617647db
feat: move cli to core (#55)
* refactor: move cli to core

* feat: move cli to core

- use route-middleware in serve
- eliminate need for `routes` dir in app

* feat: use route-middleware in build

* chore: update test gh action
2025-01-08 21:21:31 +01:00

23 lines
682 B
JavaScript
Executable file

#!/usr/bin/env node
import { defineCommand, runMain } from 'citty'
const main = defineCommand({
meta: {
name: 'mcfly',
description: 'McFly CLI',
},
subCommands: {
new: () => import('./commands/new.mjs').then((r) => r.default),
serve: () => import('./commands/serve.mjs').then((r) => r.default),
build: () => import('./commands/build.mjs').then((r) => r.default),
prepare: () => import('./commands/prepare.mjs').then((r) => r.default),
generate: () => import('./commands/generate.mjs').then((r) => r.default),
g: () => import('./commands/generate.mjs').then((r) => r.default),
},
})
runMain(main)
export const exportedForTest = {
main,
}