Skip to content

Commit

Permalink
Remove package build-types directories when cleaning (#61939)
Browse files Browse the repository at this point in the history
Stale generated types can be left sitting around the repo which can cause build issues. Gutenberg recommends using the `clean:package-types` command to clean types and fix this problem, but the generated declaration files remain.

This can cause issues with builds that are resolved by removing the stale declaration files (put in the build-types directories) and getting a fresh build.

---

Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
  • Loading branch information
4 people committed May 24, 2024
1 parent f524232 commit 52ec776
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@
"prebuild:packages": "npm run clean:packages && lerna run build",
"build:packages": "npm run --silent build:package-types && node ./bin/packages/build.js",
"build:plugin-zip": "bash ./bin/build-plugin-zip.sh",
"clean:package-types": "tsc --build --clean",
"clean:packages": "rimraf \"./packages/*/@(build|build-module|build-style)\"",
"clean:package-types": "tsc --build --clean && rimraf \"./packages/*/build-types\"",
"clean:packages": "rimraf \"./packages/*/@(build|build-module|build-style|build-types)\"",
"dev": "npm run build:packages && concurrently \"wp-scripts start\" \"npm run dev:packages\"",
"dev:packages": "concurrently \"node ./bin/packages/watch.js\" \"tsc --build --watch\"",
"distclean": "rimraf node_modules packages/*/node_modules",
Expand Down

0 comments on commit 52ec776

Please sign in to comment.