Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions esbuild-cli.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import esbuild from 'esbuild';
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// Standalone CLI bundle (dist/cli.js). Kept separate from esbuild.mjs so the
// extension build pipeline stays untouched.
await esbuild.build({
entryPoints: [path.join(__dirname, 'src', 'cli.ts')],
bundle: true,
platform: 'node',
target: 'node20',
outfile: path.join(__dirname, 'dist', 'cli.js'),
format: 'cjs',
sourcemap: false,
minify: false,
});

console.log('CLI build complete: dist/cli.js');
1 change: 1 addition & 0 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "https://unpkg.com/knip@latest/schema.json",
"entry": [
"src/extension.ts",
"src/cli.ts",
"src/canvas/host.ts",
"src/webview/app.ts",
"src/core/warm-up-worker.ts",
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,15 @@
}
]
},
"bin": {
"aicoach": "./dist/cli.js",
"ai-engineer-coach": "./dist/cli.js"
},
"scripts": {
"vscode:prepublish": "npm run build",
"build": "node esbuild.mjs",
"build:cli": "node esbuild-cli.mjs",
"cli": "node dist/cli.js",
"watch": "node esbuild.mjs --watch",
"lint": "eslint src/",
"bench": "vitest bench",
Expand Down
Loading