Skip to content

How to share scripts between projects in a workspace? #2405

Closed

Description

@zkochan

In the pnpm monorepo, we copy/paste the same scripts to almost every project. There should be a better way to do this.

Yarn solved this with constraints. For instance, this is how they generate the prepack scripts:

https://github.com/yarnpkg/berry/blob/20a3fdfe6ef88bf611a5b3af21abe24c86add204/constraints.pro#L62-L69

We don't have constraints support though. And seems like not everyone is currently happy with Yarn's constraints, as they are written in Prolog.

Maybe we could come up with something like a "baseScripts", which are inherited by each workspace project.

related: #1813

Activity

  1. locked and limited conversation to collaborators on Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions