Skip to content

Commit

Permalink
Add Turbo build to build packages in parallel with caching (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
stian-overasen committed Jun 26, 2024
1 parent 6f5474d commit 6487497
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ sql/
# Other
debug.log
wp-debug.log
.turbo
98 changes: 98 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"npm": ">=8",
"yarn": "Please use npm"
},
"packageManager": "npm@10.7.0",
"workspaces": [
"packages/mu-plugins/*",
"packages/plugins/*",
Expand Down Expand Up @@ -34,15 +35,16 @@
"postcss-url": "^10.1.3",
"prettier": "^3.3.2",
"resolve-url-loader": "^5.0.0",
"turbo": "^2.0.5",
"webpack-remove-empty-scripts": "^1.0.4"
},
"scripts": {
"create-block": "cd packages/plugins && npx dekodeinteraktiv/create-project-base-block",
"create-innerblock-block": "cd packages/plugins && npx dekodeinteraktiv/create-project-base-block --template innerblocks",
"prepare": "husky",
"build": "npm run build --workspaces --if-present",
"start": "npm run start --workspaces --if-present",
"clean": "npm run clean --workspaces --if-present && rm -rf node_modules",
"build": "turbo run build",
"start": "turbo run start",
"clean": "turbo run clean && rm -rf node_modules",
"format": "prettier --write .",
"check-engines": "wp-scripts check-engines",
"lint": "npm run lint:js && npm run lint:css && npm run lint:format",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/blueprint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"scripts": {
"build": "wp-scripts build --webpack-copy-php",
"start": "wp-scripts start --webpack-copy-php",
"clean": "rm -rf node_modules build dist"
"clean": "rm -rf node_modules build dist .turbo"
}
}
2 changes: 1 addition & 1 deletion packages/themes/dekode-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"start": "concurrently npm:start:*",
"start:wp-scripts": "wp-scripts start",
"_start:theme-json": "theme-json watch",
"clean": "rm -rf node_modules build dist"
"clean": "rm -rf node_modules build dist .turbo"
},
"css-clamp": {
"minWidth": 512,
Expand Down
15 changes: 15 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"]
},
"start": {
"cache": false,
"persistent": true
},
"clean": {
"cache": false
}
}
}

0 comments on commit 6487497

Please sign in to comment.