Creating custom polymer element

76 Views Asked by At

I am trying to create a new template such that if I do this:

polymer init <custom-element>

I get a new project created in the development system.

Is there any documentation on how I can do this?

1

There are 1 best solutions below

0
On

To create a custom option in polymer init command, we have to build a new Yeoman generator. Here is a guide on how to do that.

The only condition that generator should satisfy so that it is recognized by polymer cli is:

  • The generator should be named generator-polymer-init followed by the name that we use in polymer init command.

For example, let us say we want polymer init custom-build option, we need to create a Yeoman generator with name generator-polymer-init-custom-build. In fact, polymer developers have created a generator with the same name that we can take a look: generator-polymer-init-custom-build