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 modulepull/4930/head^2
parent
32a9a2e46b
commit
d0d38990c7
|
@ -3,4 +3,4 @@ class {{properCase name}}Controller {
|
|||
constructor() {}
|
||||
}
|
||||
|
||||
export default {{properCase name}}Controller;
|
||||
export default {{properCase name}}Controller;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import {{properCase name}}Controller from './{{dashCase name}}/{{camelCase name}}Controller.js'
|
||||
import angular from 'angular';
|
||||
import controller from './{{dashCase name}}.controller.js'
|
||||
|
||||
angular.module('portainer.{{module}}').component('{{camelCase name}}', {
|
||||
templateUrl: './{{camelCase name}}.html',
|
||||
controller: {{properCase name}}Controller,
|
||||
});
|
||||
export const {{camelCase name}} = {
|
||||
templateUrl: './{{dashCase name}}.html',
|
||||
controller,
|
||||
};
|
||||
|
||||
angular.module('portainer.{{module}}').component('{{camelCase name}}', {{camelCase name}})
|
||||
|
|
|
@ -25,12 +25,12 @@ module.exports = function (plop) {
|
|||
},
|
||||
{
|
||||
type: 'add',
|
||||
path: `{{cwd}}/{{dashCase name}}/{{camelCase name}}Controller.js`,
|
||||
path: `{{cwd}}/{{dashCase name}}/{{dashCase name}}.controller.js`,
|
||||
templateFile: './plop-templates/component-controller.js.hbs',
|
||||
},
|
||||
{
|
||||
type: 'add',
|
||||
path: `{{cwd}}/{{dashCase name}}/{{camelCase name}}.html`,
|
||||
path: `{{cwd}}/{{dashCase name}}/{{dashCase name}}.html`,
|
||||
templateFile: './plop-templates/component.html.hbs',
|
||||
},
|
||||
], // array of actions
|
||||
|
|
Loading…
Reference in New Issue