Follow these steps to automatically preview your theme’s changes with the Watch task. Note that this task only works for themes that use the liferay JS Theme Toolkit, such as those created with the Liferay Theme Generator.
Navigate to your theme’s root folder and run
gulp watch. This sets up a proxy for your app server and opens it in a new window in the browser.
Make a change to your theme and save the file. The updated files are built, compiled, and copied directly to the proxy port (e.g.
9080). CSS changes are deployed live, so no page reload is needed.
Once you’re happy with the changes, re-deploy your theme to apply the changes to your site on your app server.