这是indexloc提供的服务,不要输入任何密码
Skip to content

Auto-Scoped Task Execution In Monorepo Packages #550

@derekdowling

Description

@derekdowling

Describe the feature you'd like to request

This is similar to the request in #417.

It would be extremely helpful to be able to run turbo-repo commands within individual packages rather than solely at the root of a monorepo. Often times it can be faster and easier to run commands (test, lint, etc) within a specific package while developing, especially if that package is depended on by many other packages or apps within the project.

Describe the solution you'd like

Within a package, I can run turbo run <task>. When this happens, turbo-repo will automatically determine the correct "scope" of the task to the directory the command was executed in, run dependsOn tasks, but not execute the task for any dependencies of the package. Any outputs of this should feed back into turbo-repo's cache.

I believe this maps to:
turbo run <task> --scope="<monorepo-rel-path-to-cwd>" --no-deps --include-dependencies

Describe alternatives you've considered

Updating package.json in 50+ monorepo packages * N different tasks to perform:cd ../<monorepo-root> && yarn turbo run <task> --scope=<package-path> which is extremely time consuming and brittle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions