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
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 firstname.lastname@example.org
You must update the theme’s
liferay-theme-tasksdependency to version
9.x.xas well to run the upgrade process:
npm install --save-dev email@example.com
9.x.xversions of the
liferay-theme-tasksand Liferay Theme Generator installed, run the
gulp upgradecommand 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.
gulp initfrom 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.