Skip to content

Commit 72d4961

Browse files
authored
Merge pull request #7 from tinytek-io:setup-turbo-repo
Setup turbo repo
2 parents e46ddf5 + e6d3941 commit 72d4961

File tree

5 files changed

+146
-11
lines changed

5 files changed

+146
-11
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ out/
2525
.env.local
2626
TODO.md
2727
log.txt
28+
29+
# Turbo repo
30+
.turbo

package-lock.json

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
"private": true,
44
"version": "0.0.5",
55
"scripts": {
6-
"dev": "npm run dev --workspaces --if-present",
7-
"build": "npm run build --workspaces --if-present",
8-
"preview": "npm run preview --workspaces --if-present",
9-
"test": "npm run test --workspaces --if-present",
10-
"check:link": "npm run check:link --workspaces --if-present",
11-
"check:format": "npm run check:format --workspaces --if-present",
6+
"dev": "turbo dev dev:client dev:server",
7+
"build": "turbo build",
8+
"preview": "turbo preview",
9+
"test": "turbo test",
10+
"check:lint": "turbo check:lint",
11+
"check:format": "turbo check:format",
12+
"check:types": "turbo check:types",
1213
"tail:log": "tail -f ./packages/ts-plugin/log.txt",
13-
"package": "npm install && npm run build && vsce package --pre-release"
14+
"package": "npm install && turbo build && vsce package --pre-release"
1415
},
16+
"packageManager": "npm@10.2.4",
1517
"workspaces": [
1618
"packages/ts-plugin",
1719
"packages/webview-ui",
@@ -30,8 +32,9 @@
3032
"eslint": "^9.3.0",
3133
"fork-ts-checker-webpack-plugin": "^9.0.2",
3234
"prettier": "^3.2.5",
33-
"typescript": "^5.4.5",
34-
"ts-node": "^10.9.2"
35+
"ts-node": "^10.9.2",
36+
"turbo": "^2.0.3",
37+
"typescript": "^5.4.5"
3538
},
3639
"displayName": "WindCraft",
3740
"preview": true,

packages/ts-plugin/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
"./package.json": "./package.json"
1010
},
1111
"scripts": {
12-
"dev": "npm run dev:client & npm run dev:server && npm run dryrun",
1312
"dev:client": "tsc -p . -w",
1413
"dev:server": "rspack --watch",
15-
"build": "npm run build:client && npm run build:server",
1614
"build:client": "rm -rf ./dist && tsc -p .",
1715
"build:server": "rspack --mode production",
1816
"check:types": "tsc -p . --noEmit",

turbo.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "https://turbo.build/schema.json",
3+
"remoteCache": {
4+
"enabled": false
5+
},
6+
"tasks": {
7+
"build": {
8+
"dependsOn": ["^build", "^build:client", "^build:server"],
9+
"outputs": ["dist/**"]
10+
},
11+
"build:client": {
12+
"dependsOn": ["^build:client"],
13+
"outputs": ["dist/client/**"]
14+
},
15+
"build:server": {
16+
"dependsOn": ["^build:server"],
17+
"outputs": ["dist/server/**"]
18+
},
19+
"check:types": {
20+
"dependsOn": ["^check:types"]
21+
},
22+
"dev": {
23+
"persistent": true,
24+
"cache": false
25+
},
26+
"dev:client": {
27+
"persistent": true,
28+
"cache": false
29+
},
30+
"dev:server": {
31+
"persistent": true,
32+
"cache": false
33+
}
34+
}
35+
}

0 commit comments

Comments
 (0)