-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add support for configurable package locations #332
Conversation
@@ -13,7 +13,7 @@ export default class Repository { | |||
GitUtilities.init(); | |||
} | |||
|
|||
this.rootPath = GitUtilities.getTopLevelDirectory(); | |||
this.rootPath = path.resolve(GitUtilities.getTopLevelDirectory()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was about to comment to add path.resolve()
here 😉
ran into the same thing with #237
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented it in a different way in motion#1 |
@steelbrain Nice! Looks like the main difference from a user perspective is this uses globs instead of directories? It's also wrapping the items in objects ( |
@gigabo The idea of globs is certainly tempting but in a realistic view, this could stray the package from it's main purpose. Having two separate package directories allows sorting packages based on their roles but still enforces them to be purely mono repo package directories, in our use case it was If we allow users to mix lerna packages with other things in deep directories, it's only gonna get messy. but that's just my opinion :) |
Oh, it's still all packages! The globs resolve to |
Ohhhh, in that case sounds good 👍 |
That reminds me... I'm missing documentation here! Also new tests... 😅 |
This adds a `packages` configuration option to `lerna.json`: ```json { "lerna": "2.0.0-beta.27", "version": "0.2.3", "packages": [ {"glob": "packages/{core,plugins}/*/package.json"}, {"glob": "build-tools/package.json"}, {"glob": "integration-tests/**/package.json"} ] } ``` The default is `[{"glob": "packages/*/package.json"}]`, which is equivalent to the historical layout of a Lerna repo. This addresses lerna#126 and lerna#231.
cd88be2
to
f1c5507
Compare
Does this teach Lerna how to do anything with these package groups as a unit, or does it just allow you to split the "global Lerna namespace" across multiple directories? Example: if I have e.g. "apps" and "modules" as mentioned above, am I able to run things on only one glob, or do I still have to name packages in a way that |
This is ready, right? Just documentation has to be added. |
If the only thing holding this change back is documentation, I'd be happy to volunteer to write it. |
Oh, whoops meant to close this! Moved to Asini. Had some issues beyond documentation. |
Huh? Is there any real reason this isn't being added to Lerna? |
I must be misunderstanding something, how are Lerna and Asini different? |
Asini is a fork of Lerna. I need features that are unavailable in Lerna and ran into a situation where I'm unfortunately no longer comfortable contributing here. |
Moving to #365 |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This adds a
packages
configuration option tolerna.json
:The default is
[{"glob": "packages/*/package.json"}]
, which is equivalent tothe historical layout of a Lerna repo.
This addresses #126 and #231.
Still TODO: