Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Turborepo to build and watch packages in parallel #509

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "[email protected]",
"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
}
}
}
Loading