feat: turbo clean command
#10552
juliusmarminge
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-goals
?
Background
Turborepo have knowledge on the outputs of tasks. For example, the following turbo.json declares the build outputs for the build task:
{ "$schema": "https://turborepo.org/schema.json", "extends": ["//"], "tasks": { "build": { "outputs": [ "package.json", "dist/**", "adapters/**", "http/**", "observable/**", "rpc/**", "shared/**", "unstable-core-do-not-import/**" ] } } }I usually put a
cleanscript in all the repos I work with, since stale outputs can sometime be the culprit of many subtle bugs and issues when debugging. Currently, I need to declare all these artifacts multiple times and keep them in sync. In addition, I need to use cross-platform scripts to ensure it works for all contributors.I believe it would be neat if turbo could have a built-in way to clean up artifacts, both on a per-task level and on the repo level.
Proposal
Introduce
turbo clean:TASKcommand. Can be used e.g.turbo clean:buildto clean all artifacts from the build task, orturbo clean:*to clean from all tasks. It should also work with--filterflag.Beta Was this translation helpful? Give feedback.
All reactions