refactor: clean up build output (#53)

* refactor: clean up build output

* refactor: add index.ts to package roots
This commit is contained in:
Brandon Keiji
2025-04-20 12:33:39 -07:00
committed by GitHub
parent a66ad2e2af
commit f480ef4bbc
9 changed files with 31 additions and 18 deletions

7
packages/cli/index.ts Normal file
View File

@@ -0,0 +1,7 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import './src/gemini.js';

View File

@@ -3,9 +3,10 @@
"version": "1.0.0",
"description": "Gemini Code CLI",
"type": "module",
"main": "src/gemini.js",
"main": "dist/index.js",
"bin": "dist/index.js",
"scripts": {
"build": "tsc --build && cp package.json README.md ../../LICENSE dist/ && touch dist/.last_build",
"build": "tsc --build && touch dist/.last_build",
"clean": "rm -rf dist",
"start": "node dist/gemini.js",
"debug": "node --inspect-brk dist/gemini.js",

View File

@@ -2,17 +2,13 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": ".",
"jsx": "react",
"lib": ["DOM", "DOM.Iterable", "ES2020"],
"module": "Node16",
"target": "ES2020",
"paths": {
"@gemini-code/*": ["./packages/*"]
},
"types": ["node", "vitest/globals"]
},
"exclude": ["node_modules", "dist"],
"include": ["src"],
"references": [{ "path": "../server" }]
}

7
packages/server/index.ts Normal file
View File

@@ -0,0 +1,7 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export * from './src/index.js';

View File

@@ -3,10 +3,10 @@
"version": "1.0.0",
"description": "Gemini Code Server",
"type": "module",
"main": "dist/src/index.js",
"main": "dist/index.js",
"scripts": {
"start": "node dist/src/index.js",
"build": "tsc --build && cp package.json dist/",
"build": "tsc --build",
"clean": "rm -rf dist",
"lint": "eslint . --ext .ts,.tsx",
"format": "prettier --write .",

View File

@@ -2,10 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": ".",
"lib": ["DOM", "DOM.Iterable", "ES2020"],
"module": "Node16",
"target": "ES2022",
"composite": true
},
"exclude": ["node_modules", "dist"]