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?
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?
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:
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