As ELMS:LN is moving towards using webcomponents for many of its designs, some developers may wish to develop these tools on their own using the polymer-cli project. This guide is a step-by-step guide on how to set up polymer-cli on your local machine for development purposes:
- Install
npm- this tool will allow you to access node and install polymer-cli as well as other packages. This is done through one of two methods: - Download the files via: https://nodejs.org/en/download/
curl -L https://www.npmjs.com/install.sh | sh- Once
npmis installed you will want to install thenvmpackage manager. this allows you to switch between different versions ofnpm. - Guide: https://github.com/psudug/nittany-vagrant/wiki/Manually-installing-node-and-npm
- Once
nvmandnpmare installed, you are ready to begin installing polymer-cli - Run
nvm use 4.1.2to switch your version of node to 4.1.2. - Run
npm install -g polymer-clito download polymer-cli to your local machine. This may take a few minutes... - After the install is finished you can create a new folder and setup your project with polymer init
mkdir examplecd examplepolymer init- Follow the prompt's instructions and any of the documentation on polymer's site to begin your first project! (https://www.polymer-project.org/1.0/start/first-element/intro)