generator-polymer-init-element-seed
Polymer2.0 simple element generator
Installation
First, install Yeoman and generator-polymer-init-element-seed using npm (we assume you have pre-installed node.js).
npm install -g yonpm install -g generator-polymer-init-element-seed
Then generate your new project:
yo polymer-init-element-seed
Element
You can create a simple Polymer2.0 element, with no iron-page and the stuff you can create in production mode development, as is a speed dev option for create a base bone Polymer 2.0 element, here the skeleton for the element! (updated 26/02/2017) :
<!-- Load the Polymer.Element base class --><!-- Attention > Polymer 2.0#preview in USE ! --> <!-- Load the Polymer.Element base class --> <!-- Style --> Name : [[name]]
Up and Running
To up and running the environment and the Polymer 2.0 custom element just created follow these simple steps :
mkdir your_project && cd $_bower init bower install --save polymer/polymer#2.0-preview
create a index.html file where to insert the Polymer2.0 custom element just created with the generator, this is an example of file :
Polymer element - Test
Launch a simple web server to see the Polymer2.0 custom element in action, (here we use the simple python simple server) :
cd your_project // simple python web server python -m SimpleHTTPServer 8080 // default polymer serverpolymer serve
Open the browser and navigate the address localhost:8000 or localhost:8080 !
Important
That's it, this is a semplified version of the developer/building process, it's use in production it's not recommended !
License
MIT © @cicciosgamino