feat(regime)
This commit is contained in:
commit
2be7ec6836
62 changed files with 1817 additions and 0 deletions
30
bin/regime
Executable file
30
bin/regime
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bun
|
||||
import { resolve } from "path"
|
||||
import { check } from "../src/check"
|
||||
import { sync } from "../src/sync"
|
||||
import { promote } from "../src/promote"
|
||||
import { templates } from "../src/templates"
|
||||
|
||||
const [command, ...rawArgs] = process.argv.slice(2)
|
||||
const hasYes = rawArgs.includes("--yes")
|
||||
const hasFull = rawArgs.includes("--full")
|
||||
const args = rawArgs.filter(a => a !== "--yes" && a !== "--full")
|
||||
const targetDir = resolve(args[0] ?? process.cwd())
|
||||
|
||||
switch (command) {
|
||||
case "check":
|
||||
await check(targetDir, hasFull)
|
||||
break
|
||||
case "sync":
|
||||
await sync(targetDir)
|
||||
break
|
||||
case "promote":
|
||||
await promote(targetDir, hasYes)
|
||||
break
|
||||
case "templates":
|
||||
templates(hasFull)
|
||||
break
|
||||
default:
|
||||
console.error("Usage: regime <check|sync|promote|templates> [path] [--yes] [--full]")
|
||||
process.exit(1)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue