mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Improve turbo task dependency declarations (#4323)
This commit is contained in:
parent
664346e34b
commit
73f39616c3
16 changed files with 118 additions and 38 deletions
2
.github/workflows/marketplace-publish.yml
vendored
2
.github/workflows/marketplace-publish.yml
vendored
|
|
@ -36,7 +36,7 @@ jobs:
|
|||
- name: Package Extension
|
||||
run: |
|
||||
current_package_version=$(node -p "require('./src/package.json').version")
|
||||
pnpm build
|
||||
pnpm vsix
|
||||
|
||||
# Save VSIX contents to a temporary file to avoid broken pipe issues.
|
||||
unzip -l bin/roo-cline-${current_package_version}.vsix > /tmp/roo-code-vsix-contents.txt
|
||||
|
|
|
|||
2
.github/workflows/nightly-publish.yml
vendored
2
.github/workflows/nightly-publish.yml
vendored
|
|
@ -46,7 +46,7 @@ jobs:
|
|||
console.log(`🔖 Nightly version set to ${pkg.version}`);
|
||||
EOF
|
||||
- name: Build VSIX
|
||||
run: pnpm build:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix
|
||||
run: pnpm vsix:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix
|
||||
- name: Publish to VS Code Marketplace
|
||||
env:
|
||||
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
||||
|
|
|
|||
37
MONOREPO.md
37
MONOREPO.md
|
|
@ -24,7 +24,7 @@ pnpm install
|
|||
If things are in good working order then you should be able to build a vsix and install it in VSCode:
|
||||
|
||||
```sh
|
||||
pnpm build -- --out ../bin/roo-code-main.vsix && \
|
||||
pnpm vsix -- --out ../bin/roo-code-main.vsix && \
|
||||
code --install-extension bin/roo-code-main.vsix
|
||||
```
|
||||
|
||||
|
|
@ -34,9 +34,40 @@ To fully stress the monorepo setup, run the following:
|
|||
pnpm clean && pnpm lint
|
||||
pnpm clean && pnpm check-types
|
||||
pnpm clean && pnpm test
|
||||
pnpm clean && pnpm bundle
|
||||
pnpm clean && pnpm build
|
||||
pnpm clean && pnpm bundle
|
||||
pnpm clean && pnpm bundle:nightly
|
||||
|
||||
pnpm clean && pnpm npx turbo watch:bundle
|
||||
pnpm clean && pnpm npx turbo watch:tsc
|
||||
cd apps/vscode-e2e && pnpm test:ci
|
||||
|
||||
pnpm --filter @roo-code/vscode-e2e test:ci
|
||||
|
||||
pnpm clean && \
|
||||
pnpm vsix -- --out ../bin/roo-code.vsix && \
|
||||
code --install-extension bin/roo-code.vsix
|
||||
|
||||
pnpm clean && \
|
||||
pnpm vsix:nightly -- --out ../../../bin/roo-code-nightly.vsix && \
|
||||
code --install-extension bin/roo-code-nightly.vsix
|
||||
```
|
||||
|
||||
### Turborepo
|
||||
|
||||
Note that this excludes the `build` task for next.js apps (@roo-code/web-\*).
|
||||
|
||||
Tasks: `build` -> `bundle` -> `vsix`
|
||||
|
||||
build:
|
||||
|
||||
- `@roo-code/build` [input: src, package.json, tsconfig.json | output: dist]
|
||||
- `@roo-code/types` [input: src, package.json, tsconfig.json, tsup.config.ts | output: dist]
|
||||
- `@roo-code/webview-ui` [input: src, package.json, tsconfig.json, vite.config.ts | output: ../src/webview-ui]
|
||||
|
||||
bundle:
|
||||
|
||||
- `roo-cline` [input: * | output: dist]
|
||||
|
||||
vsix:
|
||||
|
||||
- `roo-cline` [input: dist | output: bin]
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ Changes to the webview will appear immediately. Changes to the core extension wi
|
|||
Alternatively you can build a .vsix and install it directly in VSCode:
|
||||
|
||||
```sh
|
||||
pnpm build
|
||||
pnpm vsix
|
||||
```
|
||||
|
||||
A `.vsix` file will appear in the `bin/` directory which can be installed with:
|
||||
|
|
|
|||
|
|
@ -48,10 +48,9 @@ async function main() {
|
|||
console.log(`[${name}] buildDir: ${buildDir}`)
|
||||
console.log(`[${name}] distDir: ${distDir}`)
|
||||
|
||||
// Clean build directory before starting new build
|
||||
if (fs.existsSync(buildDir)) {
|
||||
console.log(`[${name}] Cleaning build directory: ${buildDir}`)
|
||||
fs.rmSync(buildDir, { recursive: true, force: true })
|
||||
if (fs.existsSync(distDir)) {
|
||||
console.log(`[${name}] Cleaning dist directory: ${distDir}`)
|
||||
fs.rmSync(distDir, { recursive: true, force: true })
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
15
apps/vscode-nightly/turbo.json
Normal file
15
apps/vscode-nightly/turbo.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"bundle:nightly": {
|
||||
"dependsOn": ["^build", "@roo-code/vscode-webview#build:nightly"],
|
||||
"outputs": ["build/**"]
|
||||
},
|
||||
"vsix:nightly": {
|
||||
"dependsOn": ["bundle:nightly"],
|
||||
"inputs": ["build/**"],
|
||||
"outputs": ["../../../bin/**"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
import type { NextConfig } from "next"
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
webpack: (config) => {
|
||||
config.resolve.extensionAlias = { ".js": [".ts", ".tsx", ".js", ".jsx"] }
|
||||
return config
|
||||
},
|
||||
}
|
||||
|
||||
export default nextConfig
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "@roo-code/web-evals",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"lint": "next lint",
|
||||
"check-types": "tsc -b",
|
||||
|
|
|
|||
10
apps/web-evals/turbo.json
Normal file
10
apps/web-evals/turbo.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"outputs": [".next/**"],
|
||||
"inputs": ["src/**", "package.json", "tsconfig.json", "next.config.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
10
apps/web-roo-code/turbo.json
Normal file
10
apps/web-roo-code/turbo.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"outputs": [".next/**"],
|
||||
"inputs": ["src/**", "package.json", "tsconfig.json", "next.config.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,10 +13,11 @@
|
|||
"check-types": "turbo check-types --log-order grouped --output-logs new-only",
|
||||
"test": "turbo test --log-order grouped --output-logs new-only",
|
||||
"format": "turbo format --log-order grouped --output-logs new-only",
|
||||
"build": "turbo build --log-order grouped --output-logs new-only",
|
||||
"bundle": "turbo bundle --log-order grouped --output-logs new-only",
|
||||
"bundle:nightly": "turbo bundle:nightly --log-order grouped --output-logs new-only",
|
||||
"build": "turbo vsix --log-order grouped --output-logs new-only",
|
||||
"build:nightly": "turbo vsix:nightly --log-order grouped --output-logs new-only",
|
||||
"vsix": "turbo vsix --log-order grouped --output-logs new-only",
|
||||
"vsix:nightly": "turbo vsix:nightly --log-order grouped --output-logs new-only",
|
||||
"clean": "turbo clean --log-order grouped --output-logs new-only && rimraf dist out bin .vite-port .turbo",
|
||||
"changeset:version": "cp CHANGELOG.md src/CHANGELOG.md && changeset version && cp -vf src/CHANGELOG.md .",
|
||||
"knip": "knip --include files",
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@
|
|||
"publish:marketplace": "vsce publish --no-dependencies && ovsx publish --no-dependencies",
|
||||
"watch:bundle": "pnpm bundle --watch",
|
||||
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
|
||||
"clean": "rimraf README.md CHANGELOG.md LICENSE dist webview-ui out mock .turbo"
|
||||
"clean": "rimraf README.md CHANGELOG.md LICENSE dist mock .turbo"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anthropic-ai/bedrock-sdk": "^0.10.2",
|
||||
|
|
|
|||
19
src/turbo.json
Normal file
19
src/turbo.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"bundle": {
|
||||
"dependsOn": ["^build", "@roo-code/vscode-webview#build"],
|
||||
"outputs": ["dist/**"]
|
||||
},
|
||||
"vsix": {
|
||||
"dependsOn": ["bundle"],
|
||||
"inputs": ["dist/**"],
|
||||
"outputs": ["../bin/**"]
|
||||
},
|
||||
"watch:bundle": {
|
||||
"dependsOn": ["@roo-code/build#build", "@roo-code/types#build"],
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
23
turbo.json
23
turbo.json
|
|
@ -12,28 +12,7 @@
|
|||
},
|
||||
"build": {
|
||||
"outputs": ["dist/**"],
|
||||
"inputs": ["src/**", "package.json", "tsconfig.json", "tsup.config.ts"]
|
||||
},
|
||||
"build:nightly": {},
|
||||
"bundle": {
|
||||
"dependsOn": ["^build"],
|
||||
"cache": false
|
||||
},
|
||||
"bundle:nightly": {
|
||||
"dependsOn": ["^build"],
|
||||
"cache": false
|
||||
},
|
||||
"vsix": {
|
||||
"dependsOn": ["bundle", "@roo-code/vscode-webview#build"],
|
||||
"cache": false
|
||||
},
|
||||
"vsix:nightly": {
|
||||
"dependsOn": ["bundle:nightly", "@roo-code/vscode-webview#build:nightly"],
|
||||
"cache": false
|
||||
},
|
||||
"watch:bundle": {
|
||||
"dependsOn": ["@roo-code/build#build", "@roo-code/types#build"],
|
||||
"cache": false
|
||||
"inputs": ["src/**", "package.json", "tsconfig.json", "tsup.config.ts", "vite.config.ts"]
|
||||
},
|
||||
"watch:tsc": {
|
||||
"cache": false
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"preview": "vite preview",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"build-storybook": "storybook build",
|
||||
"clean": "rimraf build tsconfig.tsbuildinfo .turbo"
|
||||
"clean": "rimraf ../src/webview-ui/build ../apps/vscode-nightly/build/webview-ui tsconfig.tsbuildinfo .turbo"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-alert-dialog": "^1.1.6",
|
||||
|
|
|
|||
12
webview-ui/turbo.json
Normal file
12
webview-ui/turbo.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"outputs": ["../src/webview-ui/**"]
|
||||
},
|
||||
"build:nightly": {
|
||||
"outputs": ["../apps/vscode-nightly/build/webview-ui/**"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue