Usage with Polymer CLI
The generator-polymer-init-vaadin-elements-app is a boilerplate template for creating a new Polymer Application that uses Paper and Vaadin Elements.
The template, which smoothly integrates with the Polymer-CLI tool, produces a fully featured Progressive Web Application (PWA).
We assume that you already have installed in your system
Otherwise, please follow the specific instructions of each tool in their website.
Then install the template package globally:
$ npm install -g generator-polymer-init-vaadin-elements-app
Creating the Application
Create a new application with the
$ polymer init command, passing the
$ mkdir my-project $ cd my-project $ polymer init vaadin-elements-app
It will create a Polymer CLI project structure. In order to know more details abut the project structure, or to check more command options in the tool, please refer to the Polymer CLI documentation.
The following command serves the app at http://localhost:8080 and provides a basic URL routing for the application:
$ polymer serve
Now, you can modify application files with your favorite editor, and those changes will be automatically reloaded in the browser.
The application includes automated tests located in the test directory. To run the tests, run the following command:
$ polymer test
The following command performs HTML, CSS, and JS minimization of the dependencies, and generates the service workers.
$ polymer build
It outputs two variants of the application, one in the build/unbundled folder for HTTP/2+Push compatible servers, and the other output in the build/bundled folder that bundles all the dependencies in a single file. It is compatible with any classic web server.
You can test the build by running the following command:
$ polymer serve build/bundled