-
Notifications
You must be signed in to change notification settings - Fork 45
Upgrade to 3.x
Rémy Denton edited this page Jul 27, 2021
·
11 revisions
- Load
bolt-global.js
first, before any other theme JS, at the bottom of the page before the closing</body>
tag. - Load
bolt-global.js
synchronously, i.e. do not addasync
ordefer
to the script tag. - Remove any inline critical CSS and JS in the
<head>
. - Remove any other fallback
<script>
tags for legacy browsers, as we no longer support IE11.
The following packages are no longer required. Please remove them from .boltrc
:
postcss-themify
components-critical-css
components-critical-css-vars
components-critical-fonts
critical-path-polyfills
- The deprecated old card (@bolt-components-card/card.twig) has been removed in 3.x. Any usage should be replaced with the new card (@bolt-components-card-replacement/card-replacement.twig) before updating.
fin composer require pega/bolt-release:^3.1.1
(use latest 3.x.x
version)
fin composer require pega/pega_bolt:dev-8.x-3.x
fin composer require pega/pega_bolt_theme:dev-8.x-3.x
- Be sure your theme contains a
.nvmrc
file with versionv12.12.0
. See example. - Update Node version in your Dockerfile to
v12.12.0
. See example. - Update Bamboo to install version
v12.12.0
(tbd)
- Search site-specific theme for
@bolt/
to find Bolt dependencies still using^2.x.x
. - Update all of these to
^3.x.x
. The latest version for most packages is3.1.0
or3.1.1
. See npm (example) for the exact version number of your package. - A common dependency is
@bolt/core-v3.x
. Update that like so:
- "@bolt/core-v3.x": "^2.31.2"
+ "@bolt/core-v3.x": "^3.1.1"
In most cases, patches to the Bolt build should be deleted. In the past, patches were added because the build tools were out of sync with the latest Bolt code. Now that the build tools have been updated, patches should not be necessary. Let us know if you find an exception.
The updated build tools will add a cache directory to the theme. Ignore this directory. See example.
Either use your site's makefiles or manually run the following:
cd docroot/themes/custom/YOUR_THEME
fin exec yarn install --force
fin exec yarn gulp
fin drush cr
- Basic A11y Checklist
- Get started with Bolt locally
- Bolt Specific Standards and Conventions
- How to save SVG graphics and SVG icons
- Upgrade to minor release
- Upgrade to 4.x
- Upgrade to 5.x
- Release Workflow
- VS Code Configuration
- Bolt Doc Writing Guide
- Prefixing Custom Attributes
- Standard Props for Passing Content in Twig
- Building Websites with Bolt in Drupal
- From Design Mockup to Code
- Override with Utility Classes