chore(dev): Add dev runner and split dev ports
Add dev:web (rsbuild) and dev:cli (tttk serve ./content), with dev running both via scripts/dev.mjs, which shuts both down when either exits. Also add tttk:inspect for --inspect debugging. Both servers previously defaulted to port 3000, so the CLI could not bind while the web dev server was running and the proxy targeted itself. Pin the web dev server to 5173; the CLI keeps 3000 to match the proxy. Document the two-process setup and inspector debugging in docs/development.md.
This commit is contained in:
+4
-1
@@ -19,7 +19,9 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "rsbuild dev",
|
||||
"dev": "node scripts/dev.mjs",
|
||||
"dev:web": "rsbuild dev",
|
||||
"dev:cli": "node --enable-source-maps --loader ts-node/esm ./src/cli/index.ts serve ./content",
|
||||
"build": "npm run build:web && npm run build:cli",
|
||||
"build:web": "rsbuild build",
|
||||
"build:cli": "tsc -p tsconfig.cli.json",
|
||||
@@ -29,6 +31,7 @@
|
||||
"cli:build": "npm run build:cli",
|
||||
"ttrpg": "node --loader ts-node/esm ./src/cli/index.ts",
|
||||
"tttk": "node --loader ts-node/esm ./src/cli/index.ts",
|
||||
"tttk:inspect": "node --inspect --enable-source-maps --loader ts-node/esm ./src/cli/index.ts",
|
||||
"gen:reference": "node --loader ts-node/esm ./scripts/generate-reference.ts",
|
||||
"gen:skill-reference": "node --loader ts-node/esm ./scripts/generate-reference.ts --out .agents/skills/tttk-authoring/reference.md",
|
||||
"test": "jest",
|
||||
|
||||
Reference in New Issue
Block a user