Skip to content

Commit bc3cbc8

Browse files
author
Eugene Manuilov
authored
Merge pull request #10744 from google/infrastructure/10729-clear-dist-on-all-builds
Update build commands to each call remove-dist within each workspace.
2 parents c46b0a7 + c54abcd commit bc3cbc8

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

assets/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"scripts": {
3+
"prebuild:dev": "npm run remove-dist",
34
"build": "npm run build:production",
5+
"prebuild:production": "npm run remove-dist",
46
"build:dev": "webpack --mode=development --devtool cheap-module-eval-source-map --output-pathinfo",
57
"build:production": "webpack --mode=production",
68
"build:test": "npm run build:production -- --include-tests",
7-
"watch": "npm run build:dev -- --watch"
9+
"watch": "npm run build:dev -- --watch",
10+
"remove-dist": "rimraf ../dist/"
811
},
912
"browserslist": [
1013
"extends @wordpress/browserslist-config"
@@ -88,6 +91,7 @@
8891
"postcss-import-url": "^7.0.0",
8992
"postcss-loader": "^4.3.0",
9093
"postcss-preset-env": "^9.5.11",
94+
"rimraf": "^6.0.1",
9195
"rxjs": "^6.6.7",
9296
"sass": "^1.30.0",
9397
"sass-loader": "^9.0.3",

package-lock.json

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

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
{
22
"scripts": {
33
"build": "npm run -w assets build",
4-
"prebuild:dev": "npm run remove-dist",
54
"build:dev": "npm run -w assets build:dev",
6-
"prebuild:production": "npm run remove-dist",
75
"build:production": "npm run -w assets build:production",
86
"build:test": "npm run -w assets build:test",
97
"watch": "npm run -w assets watch",
10-
"prebuild:storybook": "npm run remove-dist",
118
"build:storybook": "npm run -w storybook build",
12-
"remove-dist": "rimraf ./dist",
139
"prezip": "composer run autoload-includes",
1410
"zip": "./bin/release",
1511
"dev": "npm run build:dev",
@@ -95,7 +91,6 @@
9591
"lint-staged": "^10.2.11",
9692
"patch-package": "^8.0.0",
9793
"prettier": "npm:wp-prettier@2.6.2",
98-
"rimraf": "^6.0.1",
9994
"sanitize-filename": "^1.6.3",
10095
"semver-compare": "^1.0.0",
10196
"semver-regex": "^3.1.4",

storybook/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
}
99
},
1010
"scripts": {
11+
"prebuild": "npm run remove-dist",
1112
"build": "build-storybook -c . -o ../dist --quiet --loglevel warn",
12-
"start": "start-storybook -p 9001 -c . --no-version-updates"
13+
"start": "start-storybook -p 9001 -c . --no-version-updates",
14+
"remove-dist": "rimraf ../dist/"
1315
},
1416
"devDependencies": {
1517
"@babel/preset-react": "^7.26.3",
@@ -19,6 +21,7 @@
1921
"mini-css-extract-plugin": "^1.6.2",
2022
"postcss-loader": "^4.3.0",
2123
"puppeteer": "^10.4.0",
24+
"rimraf": "^6.0.1",
2225
"sass-loader": "^9.0.3"
2326
}
2427
}

0 commit comments

Comments
 (0)