Commit 3534f15
authored
ref(dev): Split up top-level
This splits the repo-level `yarn clean` command, which currently leaves the repo in a broken state (build artifacts deleted, and unable to be rebuilt because package-level `node_modules` folders - though not the top `node_modules` folder - have also been deleted), into a number of new, more focused commands. In the `clean:deps` command, it now deletes _all_ `node_modules` folders (repo- and package-level) and reinstalls dependencies, so that the repo is no longer broken after running it. The new commands:
```
// Meant to be a useful default for day-to-day use
"clean": "run-p clean:build clean:caches"
// Runs all package-level clean commands, which delete build and testing artifacts
"clean:build": "lerna run --parallel clean"
// TODO: Are there other caches we should add here?
"clean:caches": "yarn rimraf eslintcache && yarn jest --clearCache"
// Nuke all node modules and reinstall dependencies
"clean:deps": "lerna clean --yes && rm -rf node_modules && yarn"
// insert "Clean all the things!" meme here
"clean:all": "run-p clean:build clean:caches clean:deps"
```yarn clean script (#5095)1 parent ce665e2 commit 3534f15
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
0 commit comments