Polymer CLI is the official command line tool for Polymer projects and Web Components. It includes a build pipeline, a boilerplate generator for creating elements and apps, a linter, a development server, and a test runner.
Install Polymer CLI
Make sure you have installed a version of Node.js supported by Polymer. To check the version of Node.js that you have installed, run:
See the official node version support policy for more details.
npm install npm@latest -g
Ensure that Git is installed.
If it isn't, you can find it on the Git downloads page.
Install the latest version of Bower.
npm install -g bower
Install Polymer CLI.
npm install -g polymer-cli
Bower deprecation warning: In the output from this command, you may see an npm warning about Bower being deprecated. You can safely ignore this warning. See Bower.io for more information.
You're all set. Run
polymer help to view a list of commands.
CLI project types
Polymer CLI works with two types of projects:
Elements projects. In an element project, you expose a single element or group of related elements which you intend to use in other element or app projects, or distribute on a registry like Bower or NPM. Elements are reusable and organized to be used alongside other elements, so components are referenced outside the project.
See the guide to creating an element project with the Polymer CLI for more information.
Application projects. In an app project, you build an application, composed of Polymer elements, which you intend to deploy as a website. Applications are self-contained, organized with components inside the application.
See the guide to creating an application project with the Polymer CLI for more information.
See the documentation on Polymer CLI commands for a list of commands and how to use them.