-
Notifications
You must be signed in to change notification settings - Fork 12
Updating Larva
Lara Schenck edited this page Feb 20, 2020
·
1 revision
Shared Larva patterns (those stored in the larva-patterns package) are built and committed to the parent theme repository, or pmc-core-v2. Include referenced @larva
will be transformed into a path that points to the parent theme, while includes written as @project
point to template-parts/patterns in the child theme.
When there are updates made to shared larva-patterns, they must be updated in pmc-core-v2 and deployed there, as well as published to npm.
Here are the steps for updating shared patterns in pmc-core-v2:
- Review the latest release to Larva, specifically larva-patterns, and ensure there are no breaking changes, or that you are prepared to handle them
- In pmc-core-v2/larva run command
npm install @penskemediacorp/larva@latest
where @latest is a specific version, if that is preferred. - Check your git diff. There is a postinstall script that should clean the patterns directory and re-run the parser, and you should see the updates reflected.
- There will likely be mistakes in PHPCS formatting, so next run
phpcbf
- Commit, test, and deploy your changes as usual when working with pmc-core-v2
Follow the same steps, but wait until the current version is deployed to pmc-core-v2.