You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow matching the outputs exactly to what the inputs were, this would make the configuration for format and lint:fix tasks much simpler.
Reduce need for support of $TURBO_DEFAULTS$, and $TURBO_EXTENDS$ in outputs
Non-goals
Change how outputs work fundamentally
Complicate the configuration of outputs
Supporting $TURBO_DEFAULTS$, and $TURBO_EXTENDS$ in outputs
Background
At times the inputs can become quite large, and for format tasks you almost always want to match the output exactly to what the input was. I figured it must be possible to do that more easily, but couldn't find any solution in the docs.
That is not to mention that the docs don't show any support for $TURBO_DEFAULTS$ or $TURBO_EXTENDS$ further complicating the definition of the outputs when trying to match them to the inputs.
Proposal
Add support for an $TURBO_INPUTS$ entry in the tasks.*.outputs field. This would take all the inputs considered for the task, and use those files as outputs for the task.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
formatandlint:fixtasks much simpler.$TURBO_DEFAULTS$, and$TURBO_EXTENDS$in outputsNon-goals
$TURBO_DEFAULTS$, and$TURBO_EXTENDS$in outputsBackground
At times the inputs can become quite large, and for format tasks you almost always want to match the output exactly to what the input was. I figured it must be possible to do that more easily, but couldn't find any solution in the docs.
That is not to mention that the docs don't show any support for
$TURBO_DEFAULTS$or$TURBO_EXTENDS$further complicating the definition of the outputs when trying to match them to the inputs.Proposal
Add support for an
$TURBO_INPUTS$entry in thetasks.*.outputsfield. This would take all the inputs considered for the task, and use those files as outputs for the task.Before:
{ "tasks": { "format:ts": { "inputs": [ "**/*.ts", "**/*.mts", "**/*.cts", "**/*.js", "**/*.cjs", "**/*.mjs" ], "outputs": [ "**/*.ts", "**/*.mts", "**/*.cts", "**/*.js", "**/*.cjs", "**/*.mjs" ], "cache": true } } }after:
{ "tasks": { "format:ts": { "inputs": [ "**/*.ts", "**/*.mts", "**/*.cts", "**/*.js", "**/*.cjs", "**/*.mjs" ], "outputs": [ "$TURBO_INPUTS$" ], "cache": true } } }Beta Was this translation helpful? Give feedback.
All reactions