-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(publish): Add --contents option
Fixes #1817 Probably a billion others, as well
- Loading branch information
Showing
4 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ This is useful when a previous `lerna publish` failed to publish all packages to | |
`lerna publish` supports all of the options provided by [`lerna version`](https://github.com/lerna/lerna/tree/master/commands/version#options) in addition to the following: | ||
|
||
- [`--canary`](#--canary) | ||
- [`--contents`](#--contents) | ||
- [`--git-reset`](#--git-reset) | ||
- [`--npm-tag <dist-tag>`](#--npm-tag-dist-tag) | ||
- [`--no-verify-access`](#--no-verify-access) | ||
|
@@ -77,6 +78,19 @@ When run with this flag, `lerna publish` publishes packages in a more granular w | |
|
||
> The intended use case for this flag is a per commit level release or nightly release. | ||
### `--contents` | ||
|
||
Subdirectory to publish. Must apply to ALL packages, and MUST contain a package.json file. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
evocateur
Author
Member
|
||
Package lifecycles will still be run in the original leaf directory. | ||
You should probably use one of those lifecycles (`prepare`, `prepublishOnly`, or `prepack`) to _create_ the subdirectory and whatnot. | ||
|
||
If you're into unnecessarily complicated publishing, this will give you joy. | ||
|
||
```sh | ||
lerna publish --contents dist | ||
# publish the "dist" subfolder of every Lerna-managed leaf package | ||
``` | ||
|
||
### `--git-reset` | ||
|
||
Ensures the working tree is reset by any changes the `publish` command makes. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for the feature! Is there any particular reason of why this is limited to all or nothing? Would you accept a PR to add granular support?