Repository navigation
wp-now: add instructions for publishing to npm #340
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,6 +162,19 @@ Some similarities between `wp-env` and `wp-now` to be aware of: | |
| - deployments are not possible with neither `wp-env`, nor `wp-now`; | ||
| - possible to switch easily the PHP version | ||
|
|
||
| ## Publishing to npm | ||
|
|
||
| The `wp-now` package is part of a larger monorepo, sharing its space with other sibiling packages. To publish the `wp-now` package to npm, you must first understand the automated release process facilitated by lerna. This process includes automatically incrementing the version number, creating a new tag, and publishing all modified packages to npm simultaneously. Notably, all published packages share the same version number. | ||
|
|
||
| Each package identifies a distinct organization in its `package.json` file. To publish the `wp-now` package, you need access to the npm organizations `@wp-playground`, `@php-wasm`, and `@wp-now`. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Who should publish releases?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is related to governance, I'll kick off that project soon. |
||
|
|
||
| To initiate the publishing process for the all the modified packages, execute the following commands: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we make it possible to only publish a single package?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lerna detects changes and only publishes the ones that changed. It is not possible to publish just a single package when it depends on other packages from the monorepo. You can always use
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ```bash | ||
| npm login # this is required only once and it will store the credentials in ~/.npmrc file. | ||
| npm run release | ||
| ``` | ||
|
|
||
| ## Contributing | ||
|
|
||
| We welcome contributions from the community! Please refer to the main [README.md](../../README.md) file for instructions on how to contribute to this project. | ||
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.
Are any steps required here?
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.
Nope, Lerna does that automatically. The readme could be clearer about that though, @sejas