Liferay JS Generator

The Liferay JS Generator generates JavaScript widgets using pure JavaScript tooling. You don’t have to have a deep understanding of Java to write a widget for Liferay DXP. See the Liferay JS Generator developer documentation for more information on configuring generated JavaScript widgets. This section covers these reference topics for the Liferay JS Generator:

  • How to install the Liferay JS Generator and use it to create a JS widget
  • An explanation of JS Portlet Extender’s method signature
  • A reference list of the available configuration options for system settings and instance settings

The available commands for bundles created with the Liferay JS Generator are listed below:

npm run buildPlaces the output of liferay-npm-bundler in the designated output folder. The standard output is a JAR file that can be deployed manually to Liferay DXP.
npm run deployDeploys the application to the configured server.
npm run startTests the application in a local webpack installation instead of a Liferay DXP server. This speeds up development because you can see live changes without the need to deploy. Note, however, that because it’s outside a Liferay instance, you don’t have access to Liferay’s APIs.
npm run translateRuns the translation features for your bundle. Note that this feature requires Microsoft Translator credentials. See Using Translation Features in Your Widget for more information.

Read this section to learn how to install the Liferay JS Generator and understand its configuration.

« Updating Liferay IntelliJ PluginInstalling the JS Generator and Generating a Bundle »
Was this article helpful?
0 out of 0 found this helpful