Home » Polymer CLI Commands

Polymer CLI Commands

by Online Tutorials Library

Polymer CLI Commands

Following are some CLI commands that are used with both element and app projects.

Run tests

To run test on your element or app project, go to the base directory of your project and run:

polymer test

Polymer CLI automatically runs all of the tests that it finds in the test directory. You’ll see the results of the tests in your CLI.

You can also create your own tests by going in the test directory.

Polymer CLI test1

Run Local Web server

To see a live demo of your element or app, run the local web server:

polymer serve

Polymer polymer serve1

Open the specified url to see the result:

Polymer polymer serve2

Serve Options

It facilitates you to change the port by using the following command:

Polymer polymer serve3

Polymer-serve3

You can also configure a custom hostname on your system.

You can change the default opening page index.html to any other page and a specific browser.

Next Topic#

You may also like