Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zkochan opened this issue Mar 7, 2020 · 0 comments
Closed

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

zkochan opened this issue Mar 7, 2020 · 0 comments
Labels
area: monorepo Everything related to the pnpm workspace feature type: discussion type: feature

Comments

@zkochan
Copy link
Member

zkochan commented Mar 7, 2020

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

@zkochan zkochan added type: discussion area: monorepo Everything related to the pnpm workspace feature type: feature labels Mar 7, 2020
@zkochan zkochan closed this as completed Feb 20, 2021
@pnpm pnpm locked and limited conversation to collaborators Feb 20, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area: monorepo Everything related to the pnpm workspace feature type: discussion type: feature
Projects
None yet
Development

No branches or pull requests

1 participant