Skip to content
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

[rush] Shareable rush configuration #2500

Open
RuBAN-GT opened this issue Feb 19, 2021 · 2 comments
Open

[rush] Shareable rush configuration #2500

RuBAN-GT opened this issue Feb 19, 2021 · 2 comments
Labels
enhancement The issue is asking for a new feature or design change needs design The next step is for someone to propose the details of an approach for solving the problem

Comments

@RuBAN-GT
Copy link

RuBAN-GT commented Feb 19, 2021

Summary

Hi everyone,

From zulip chat I suggested an idea to create a shareable common rush configuration in case of multiple but similar monorepos.

Hi everyone,
I have a plan to have a couple monorepos with similar structure but for different projects with own requirements.
The question is how I can unify and maintain common parts of theses projects with rush configs? They will have the one structure, probably custom commands, etc. For example, eslint provides shareable configs.
Can I do sth similar with rush?
Thank you!

I can suggest to follow something like this:

  1. Add a new attribute to json schemas extend like tsconfig or eslint configuration files:

command-line.json:

{
  "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
  "extends": ["@myproduct/rush-shared/command-line"],
  "commands": []
}
  1. @myproduct/rush-shared package should expose command-line json or js file with resulted object configuration.
  2. We can combine/mix these config for different purposes (decompose, shared data, etc).

Thank you!

@iclanton
Copy link
Member

We don't have a notion of globally installed packages, so there would need to be a new way to install packages that are allowed to be extended from. We could use the autoinstaller feature that's currently used by things like the prettier hook in this repo.

@octogonz

@octogonz octogonz added enhancement The issue is asking for a new feature or design change needs design The next step is for someone to propose the details of an approach for solving the problem labels Mar 9, 2021
@octogonz
Copy link
Collaborator

octogonz commented Mar 9, 2021

there would need to be a new way to install packages that are allowed to be extended from

Such a facility could ALSO be used to download optional components of Rush on demand. For example the AWS and Azure cloud cache drivers bring in somewhat large dependencies, and nobody will ever use both of them simultaneously.

The implementation of that could definitely be unified with the autoinstaller implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is asking for a new feature or design change needs design The next step is for someone to propose the details of an approach for solving the problem
Projects
Status: General Discussions
Development

No branches or pull requests

3 participants