This project shows how both react-union
and react-union-scripts
can be used within Liferay portal platform.
We target the version 7.2 and above. For the Liferay 7.0 and 7.1 versions see the older versions of the boilerplates.
git clone https://github.com/lundegaard/react-union.git
cd react-union/boilerplates/react-union-boilerplate-liferay-basic
yarn && yarn start
union.config.js
By default union.config.js
is configured to:
yarn start
you run development server over localhost:3300
.SampleApp
application.public/SampleApp/index.ejs
file.yarn start
to start DEV server.widget descriptors
yarn start:proxy
to start proxy server with Hot Module Replacement availableunion.config.js
. By default the target is localhost:8080
yarn build
.Resulting jar
can be found in the dist
folder as it is produced by liferay-npm-bundler. We do some preprocessing to make the filenames of more deterministic in the bundle script. This way we can make HMR in DEV mode work.
hero-portlet
modulePortlets are a preferred way how to place union apps within Liferay pages.
/hero-portlet
subfolder../gradlew build
.Make sure you have Yarn v1.3.1 or higher and Node v8 or higher.
yarn start
yarn start:proxy
Bundle to build
folder
yarn build
Bundle to build
folder and creates AMD loader specific loader
subfolder which is then used by gradle build script in liferay-amd-loader
module
yarn build:liferay
yarn test
yarn build --release --analyze