You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/plop-templates
Chaim Lev-Ari 53b37ab8c8
feat(custom-templates): introduce custom templates (#3906)
4 years ago
..
README.md chore(project): add angular components code snippets (#3649) 5 years ago
component-controller.js.hbs chore(project): add angular components code snippets (#3649) 5 years ago
component.html.hbs chore(project): add angular components code snippets (#3649) 5 years ago
component.js.hbs feat(custom-templates): introduce custom templates (#3906) 4 years ago

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