Skip to content

Commit

Permalink
feat: #5 💪 cli tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ubugeeei committed Oct 15, 2023
1 parent d15aff1 commit 7d3f683
Show file tree
Hide file tree
Showing 7 changed files with 847 additions and 1,125 deletions.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,23 @@
"play": "cd examples/_basic && pnpm run dev"
},
"devDependencies": {
"@types/adm-zip": "^0.5.2",
"@types/node": "^20.8.6",
"cspell": "^7.3.8",
"esbuild": "^0.19.4",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"husky": "^8.0.3",
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"typescript": "^5.2.2"
},
"volta": {
"node": "18.18.2"
},
"dependencies": {
"adm-zip": "^0.5.10",
"citty": "^0.1.4",
"consola": "^3.2.3"
}
}
38 changes: 38 additions & 0 deletions packages/cli/bin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { defineCommand, runMain, runCommand } from "citty";
import { unicodegen } from "./cmd/unicodegen";
import { openJTegaki } from "./cmd/jTegaki";
import { datagen } from "./cmd/datagen";

const main = defineCommand({
meta: { name: "tegaki cli tools" },
async run({ rawArgs }) {
const [command] = rawArgs;
switch (command) {
case "unicodegen":
await runCommand(unicodegen, {
rawArgs: rawArgs.slice(1),
});
break;
case "jTegaki":
await runCommand(openJTegaki, {
rawArgs: rawArgs.slice(1),
});
break;
case "datagen":
await runCommand(datagen, {
rawArgs: rawArgs.slice(1),
});
break;
default: {
console.log(`Usage: tegaki <command> [options]
available commands:
- unicodegen
- jTegaki
- datagen`);
break;
}
}
},
});

runMain(main);
314 changes: 0 additions & 314 deletions packages/cli/read_all.py

This file was deleted.

12 changes: 0 additions & 12 deletions packages/cli/read_xml.py

This file was deleted.

Loading

0 comments on commit 7d3f683

Please sign in to comment.