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
[Feature] Allow custom publish subdirectory #2113
Comments
@evocateur It's a useful feature for cross-platform libraries, I think. Tree-shaking can't solve the issue of platform differences in TypeScript definitions. For example, |
Ah, I just noticed the https://github.com/lerna/lerna/tree/master/commands/publish#--contents-dir |
@evocateur It looks like Lerna doesn't use the |
That sounds like a TypeScript problem, not a Lerna problem. |
Also, I think I have a true fix for the underlying issue. |
Which issue exactly? I've had so many while setting up this monorepo (not all Lerna related). 😅 Anyway, the monorepo is up and running now. Note: It's still using |
Specifically, not using the subdirectory package.json when publishing. I'm also adding the ability to configure |
Perfect, thanks for the help!
Nice I was just needing that! |
Published v3.14.2 with these changes |
The |
When Why can't you configure |
Huh? Lerna needs
Making the leaves private prevents anyone from naïvely running |
I guess I'm saying: remove the |
Mistakes happen, but fair enough. ;) |
Mistakes happen indeed, but package publishing is among the easier mistakes to rectify once discovered. :) |
Related: #91 #901 #1282 #1817
I'm setting up
react-spring
to use Lerna, and I wantlerna publish
to usenpm publish ./dist
instead ofnpm publish ./
, but Lerna's maintainers have declined such a feature request in the past.For each package in
packages/
directory, there exists a stubpackage.json
with only a little bit of metadata. The rest of the metadata is copied from the rootpackage.json
using a custom build script. I want the published contents to be excluded from source control (via.gitignore
), so I don't want to mutate the stubpackage.json
before publish. I could use theprepublish
andpostpublish
scripts, but that can interfere with uncommitted changes and I need to keep the published contents around for local development.One workaround is to put my package stubs in the
.packages/
directory, but I'd like to avoid that, because some platform-specific code will exist in these package stubs, and I want that code to be easily discoverable by contributors. It's better to put the package stubs inpackages/
since that's the "standard" for mono repos.LMK if you have any questions. 👍
The text was updated successfully, but these errors were encountered: