Skip to content

Commit c2ae183

Browse files
authored
Attempt to improve devex with turbo repo dev setup (#958)
1 parent 555fb1d commit c2ae183

File tree

10 files changed

+58
-38
lines changed

10 files changed

+58
-38
lines changed

Diff for: examples/nextjs/turbo.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": ["//"],
3+
"tasks": {
4+
"dev": {
5+
"persistent": true
6+
}
7+
}
8+
}

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build:react": "turbo run build --filter=@livekit/components-react...",
1212
"build:storybook": "turbo run build --filter=@livekit/component-docs-storybook...",
1313
"build:styles": "turbo run build --filter=@livekit/components-styles...",
14-
"dev:next": "turbo run dev --filter=@livekit/component-example-next...",
14+
"dev:next": "turbo watch dev --filter=@livekit/component-example-next",
1515
"dev:storybook": "turbo run dev --filter=@livekit/component-docs-storybook...",
1616
"format:check": "prettier --check \"**/src/**/*.{ts,tsx,md}\"",
1717
"format:write": "prettier --write \"**/src/**/*.{ts,tsx,md}\"",
@@ -37,7 +37,7 @@
3737
"husky": "^8.0.3",
3838
"nodemon": "^3.0.3",
3939
"prettier": "^3.2.5",
40-
"turbo": "^2.0.0",
40+
"turbo": "^2.1.1",
4141
"typescript": "5.4.2"
4242
},
4343
"engines": {

Diff for: packages/core/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.DS_Store
33
node_modules
44
dist
5-
temp
5+
temp
6+
.turbo

Diff for: packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
"scripts": {
2727
"build": "tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\"",
28-
"dev": "tsup --watch --onSuccess \"tsc --declaration --emitDeclarationOnly\"",
28+
"dev": "tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\"",
2929
"lint": "eslint -f unix \"src/**/*.{ts,tsx}\"",
3030
"test": "vitest --run",
3131
"test:watch": "vitest",

Diff for: packages/react/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ node_modules
44
.cache
55
dist
66
temp
7+
.turbo

Diff for: packages/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
],
3535
"scripts": {
3636
"build": "pnpm gen:svg && tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\"",
37-
"dev": "tsup --watch --onSuccess \"tsc --declaration --emitDeclarationOnly\"",
37+
"dev": "tsup --onSuccess \"tsc --declaration --emitDeclarationOnly\"",
3838
"gen:icons": "rimraf -I -g ./src/assets/icons/*Icon.tsx && svgr --template ./src/assets/template.js --out-dir ./src/assets/icons --typescript ../styles/assets/icons",
3939
"gen:images": "rimraf -I -g ./src/assets/images/*.tsx && svgr --template ./src/assets/template.js --out-dir ./src/assets/images --typescript --no-svgo ../styles/assets/images",
4040
"gen:svg": "pnpm gen:images && pnpm gen:icons",

Diff for: packages/styles/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dist/
22
node_modules/
3-
.temp/
3+
.temp/
4+
.turbo

Diff for: packages/styles/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"prebuild": "rimraf .temp dist",
6868
"build": "pnpm compile:sass && pnpm postcss && pnpm generate:types",
6969
"compile:sass": "sass scss:.temp/general --style compressed",
70-
"dev": "nodemon -e scss,js -x \"pnpm build\"",
70+
"dev": "pnpm build",
7171
"generate:types": "pnpm generate:types:unprefixed && pnpm generate:types:prefixed",
7272
"generate:types:prefixed": "cd dist && typed-scss-modules \"**/*.css\" --exportType default --outputFolder ../dist/types --nameFormat kebab",
7373
"generate:types:unprefixed": "cd scss && typed-scss-modules \"**/*.scss\" --exportType default --outputFolder ../dist/types_unprefixed --nameFormat kebab --exportTypeName UnprefixedClassNames",

Diff for: pnpm-lock.yaml

+29-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: turbo.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
"tasks": {
44
"build": {
55
"dependsOn": ["^build"],
6-
"outputs": ["dist/**", ".next/**", "storybook-static/**", "lib/**"]
6+
"outputs": [
7+
"dist/**",
8+
".next/**",
9+
"!.next/cache/**",
10+
"storybook-static/**",
11+
"lib/**",
12+
"src/assets/icons/**",
13+
"src/assets/images/**"
14+
]
715
},
816
"lint": {
917
"outputs": []
@@ -17,8 +25,9 @@
1725
"outputs": []
1826
},
1927
"dev": {
28+
"dependsOn": ["^dev"],
2029
"cache": false,
21-
"persistent": true
30+
"outputs": ["dist/**", ".next/**", "!.next/cache/**", "storybook-static/**", "lib/**"]
2231
},
2332
"deploy": {
2433
"dependsOn": ["^build"]

0 commit comments

Comments
 (0)