Skip to content

Commit

Permalink
feat: clean up example
Browse files Browse the repository at this point in the history
  • Loading branch information
k2on committed Oct 26, 2024
1 parent 7142b0d commit 5f15dc9
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions examples/basic/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
import { run, router, command } from "@koons/cli";
import z from "zod";

const c = command().input(z.string());

const cli = router({
add: router({
module: command()
.describe("Add a module")
.input(z.object({ name: z.number() }))
.fn(({ name }) => {
console.log(`Name: ${name}`);
}),
package: command()
.describe("Add a package")
.input(
z.object({
name: z.string(),
}),
)
.fn(({ name }) => {
console.log(`Package name: ${name}`);
console.log(`Adding module: "${name}`);
}),
}),
help: command()
Expand Down

0 comments on commit 5f15dc9

Please sign in to comment.