portainer/plop-templates
Chaim Lev-Ari d0d38990c7
chore(plop): use templates as in style guide (#4916)
* chore(plop): use templates as in style guide

fix [CE-483]

* chore(plop): export component and add to module
2021-03-19 09:03:26 +13:00
..
README.md
component-controller.js.hbs chore(plop): use templates as in style guide (#4916) 2021-03-19 09:03:26 +13:00
component.html.hbs
component.js.hbs chore(plop): use templates as in style guide (#4916) 2021-03-19 09:03:26 +13:00

README.md

Plop generator

We use plop.js to generate angular components in our app (in the future we might use it for other things). in order to create a component with the name exampleComponent, go in your terminal to the folder in which you want to create the component (for example, if I want to create it in the portainer module components, I'll go to ./app/portainer/components). then execute the following line:

yarn plop exampleComponent

this will create the following files and folders:

example-component/index.js - the component file
example-component/exampleComponent.html - the template file
example-component/exampleComponentController.js - the component controller file