A collection of shared components, scripts, wrappers, and forks in JavaScript.
- @planningcenter/helpdesk-embed (project)
- @planningcenter/url (project)
- @planningcenter/finder (project)
planningcenter/javascript
is a single repository with many independent, linked NPM packages.
This is frequently referred to as a Monorepo.
Projects like babel and react use this structure to manage related but independent packages.
Keeping these independent projects in one repository has one destinct advantage: included packages can be linked for local, cross-package development.
Here's an example...
Say you're working in @planningcenter/topbar
and need to add a feature to @planningcenter/url
. Instead of having find that repo, clone it,, make a few blind change, publish, and re-yarn
, you're able to develop and publish changes to both simultaniously.
Lerna manages publishing at the root of the project.
This is big conceptual differenceMono form 1:1
package:repo projects.
A typical workflow looks like this:
- Navigate to your project in the
/packages
directory - Develop using the scripts setup there
- Navigate back to the root and run
yarn lerna publish
- Follow the the prompts to select a new version appropriate for your changes
Here are additional commands you might find helpful:
Command | Description |
---|---|
yarn lerna ls |
List packages |
yarn lerna diff |
Diff all packages against the last release |
yarn lerna diff [pkg-name] |
Diff a single package against the last release. |
yarn lerna publish |
Publish all packages |
yarn lerna help |
See all the other cool things you can do |
All commands are prefixed with yarn
.
npm
is not an acceptable substitute for lerna
commands.
- New project generator with sensible defaults