Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

i18n-generate.mjs

15 lines466 Bytes

1import * as NodeModule from "node:module";
2​
3// The gt CLI picks its commands from package.json, and gt-i18n alone gets no `generate`.
4const { Command } = NodeModule.createRequire(import.meta.resolve("gt"))("commander");
5const { NodeCLI } = await import("gt/cli/node");
6​
7const program = new Command("gt");
8new NodeCLI(program, "gt-node", []).init();
9await program.parseAsync([
10 "node",
11 "gt",
12 "generate",
13 "--skip-version-check",
14 ...process.argv.slice(2),
15]);