You can upgrade a Liferay Portal 7.1 theme to Liferay DXP 7.2, regardless of the
development environment you use. This tutorial uses the Liferay JS Theme
Toolkit’s Gulp upgrade
task to automate much of the steps. This requires
v9.x.x of the Liferay Theme Generator and liferay theme tasks.
Here’s what the Upgrade Task does:
- Updates Liferay version references
- Updates theme dependencies
Follow these steps to upgrade the theme:
-
Install the Liferay Theme Generator v9.x.x with the command below:
npm install -g generator-liferay-theme@9.x.x
-
You must update the theme’s
liferay-theme-tasks
dependency to version9.x.x
as well to run the upgrade process:npm install --save-dev liferay-theme-tasks@9.x.x
-
With the
9.x.x
versions of theliferay-theme-tasks
and Liferay Theme Generator installed, run thegulp upgrade
command to upgrade the 7.1 theme to 7.2. -
In 7.1, Font Awesome & Glyphicons were included in the compatibility layer. Since Liferay DXP Fix Pack 2 and Liferay Portal 7.2 CE GA2, Font Awesome is available globally as a system setting, which is enabled by default. If you’re using Font Awesome icons in your theme, answer yes (y) to the Font Awesome question during the Upgrade task to include the Font Awesome dependency in your theme. This ensures that your icons won’t break if a Site Administrator disables the global setting.
-
Run
gulp init
from the theme’s root directory to update the path of the app server to point to the new 7.2 app server.
There you have it! The theme is ready to run on Liferay DXP 7.2.