Open trusktr opened 4 years ago
Turns out I discovered this isn't currently possible, because there may be issues related to https://github.com/microsoft/rushstack/issues/1702.
rush
would need to traverse up to find the nearest rush.json
, and from that tree-node in the tree of rush projects it could lookup sub-folder projects and know if the current working directory is one of those projects.
There may need to be a new rule or two regarding project paths. F.e.:
rush.json
files would override parent-folder rush.json
projects.
projects
, rush goes into the path for that project, then traverses up to find the nearest rush.json
(which would be further down than the original rush.json if it isn't the same rush.json), and finally uses that location as the basis for operation (as if we had already been in that folder to begin with when we ran the initial command). This will work great due to how rush
handles varying rush
versions already (i.e. when using rush
as a globally-installed package and it detects the version of rush to use in the current project).
This is more for discussion; not a bug or feat request.
Can we have a tree of rush-managed projects?
For example, can we have a rush repo with packages in it, where each "package" may be from another repo that uses rush to manage multiple packages?
I'm just wondering if this may be doable. Because sometimes it makes sense to split a package into several closely-related packages, but these packages may be completely un-related to a rush-managed application that consumes them.
So the structure might be:
In that example,
three
might be some package that has no idea aboutapp
, and it makes sense forthree
not to know anything aboutmy-app
.my-app
might be made by one person, andthree
by another person, in separate github accounts, and the author ofmy-app
may want to adopt thethree
package into themy-app
project not as a dependency fromNPM
, but as a git submodule so that editing the source is possible.Any experience with this sort of thing? I imagine it is perfectly doable; the parent rush project managing the commands needed to manage the rush sub-project.