-
Notifications
You must be signed in to change notification settings - Fork 7
Polymer 3.0 installation
This article describes how to install Polymer 3.0.
Before you install Polymer you should make sure that all prerequisites were properly installed and their versions are supported by Polymer.
-
Install Git, the detail information about how to install git can be fond here: Install Git
-
Install npm and Node.js. Currently Polymer supports node 8.x and 10.x versions and npm v3 or newer. If you have previously installed node and npm, please make sure that their versions are supported, and update them otherwise. You can choose one of the options below to install Node.js and npm:
- Download and install binaries. Detail documentation can be found here: Download Node and here: Node installation instruction. If you followed this instruction please do create links as it was described here: Create node links
- Install Node.js using Node Version Manager. The detail documentation is here: Install Node via nvm.
For those who has previously installed node and wants to update to newer version please see this instruction:Update node and npm. To make sure that you have installed supported versions of Node.js and npm please run next commands and see the versions:
node -v
npm -v
Install Polymer CLI using the following command: npm install -g polymer-cli
. If the previous command caused an exception, then please try this command: sudo npm install -g polymer-cli
and as the last resort, use this one: sudo npm install --unsafe-perm=true -g polymer-cli
. After that please make sure that polymer was installed properly, to do that please restart the terminal and type: polymer --version
. If you can see the Polymer-CLI version then everything is fine, otherwise you can create a link for the installed polymer. In order to do that you should know where it was installed. The next command: npm root -g
will print out the path to the global npm directory where all global packages should be installed. Then create link using this command:
sudo ln -s $GLOBAL_NPM_PATH/polymer-cli/bin/polymer.js /usr/bin/polymer
replacing $GLOBAL_NPM_PATH
with the path received by the previous command.
In order to install polymer on windows please follow this Instruction in section: Installing Polymer CLI pre-requisites on Windows 10
In order to install or update Polymer and its components to use them in TG application one may cd
to platform-web-ui/src/main/resources
directory and run install-polymer.sh
(for linux) or install-polymer.bat
(for Windows) script.
Three node components are required: rollup
, rollup-plugin-root-import
and terser
.
Install them by running npm install -g rollup
, npm install -g rollup-plugin-root-import
and npm install -g terser
.
In order to run vulcanise, two environment variables need to be specified as parameters to the Java process:
-
NODE_PATH
-- for Ubuntu this could be/usr/local/lib/nodejs/node-v10.15.0/lib/node_modules
, for macOS this could be/usr/local/lib/node_modules
, for Windows this could beC:\Users\<user>\AppData\Roaming\npm\node_modules
. -
NODE_OPTIONS
-- vulcanisation is memory hangry; need to specify this variable as--max-old-space-size=3072
.
Please refer two screen captures below as an example for configuring a runner in Eclipse.
The following program arguments worked under Windows:
application.properties C:\Progra~1\nodejs;C:\Users\<user>\AppData\Roaming\npm NODE_PATH=C:\Users\<user>\AppData\Roaming\npm\node_modules NODE_OPTIONS="--max-old-space-size=3072"
In addition, if an application is intended to be run in the "time-zone independent" mode, vulcanisation must be performed with the same time-zone as intended for deployment. A time-zone should be specified as a JVM parameters. For example, -Duser.timezone=America/New_York
. The time-zone value gets encoded into the vulcanised resource.
Per aspera ad astra
- Web UI Design and Web API
- Safe Communication and User Authentication
- Gitworkflow
- JavaScript: Testing with Maven
- Java Application Profiling
-
TG Development Guidelines
- TLS and HAProxy for development
- TG Development Checklist
- Entities and their validation
- Entity Properties
- Entity Type Enhancement
- EQL
- Tooltip How To
- All about Matchers
- Streaming data
- Synthetic entities
- Activatable entities
- Jasper Reports
- Opening Compound Master from another Compound Master
- Window management test plan
- Multi Time Zone Environment
- GraphQL Web API
- Guice
- Maven
- Full Text Search
- Deployment recipes
- Application Configuration
- JRebel Installation and Integration
- Compile-time mechanisms