Customizing JavaScript Source Code¶
The JavaScript source code is customized to improve performance.
To customize the JavaScript source code
- Create a working directory where you can extract sources from the JasperReports Server source bundle Zip file (
TIB_js-jrs_<version>_src.zip). - Download and install node.js from http://nodejs.org/.
- Install yarn (version 1.22.x is required).
-
Run the following commands to install node modules.
-
cd jasperserver-ui/pro-
yarn install- Make your changes to the JavaScript source code.
- Run the following commands to build the final bundled static assets.
-
cd jasperserver-ui/pro/jrs-ui-pro -
yarn run clean -
yarn run build
Bundled static assets will be placed in thejrs-ui/build/overlay/scriptsfolder.
-
-
Back up the
scriptsfolder of your JasperReports Server instance deployment.
For example,<tomcat>/webapps/jasperserver-pro/scriptsfolder, when Apache Tomcat is used. - Delete the content of the
scriptsfolder of your JasperReports Server instance deployment.
For example,<tomcat>/webapps/jasperserver-pro/scriptsfolder. - To deploy bundled static assets (build result) to the JasperReports Server instance, copy the content of the
jrs-ui-pro/build/overlay/scriptsfolder to thescriptsfolder of your JasperReports Server instance deployment.
For example,<tomcat>/webapps/jasperserver-pro/scriptsfolder.
Note
Visualize.js will be built as part of the build process of JavaScript source code. Therefore, there is no separate build process for Visualize.js while starting JasperReports Server 10.0.0.