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
|
@ -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}}', {
|
export const {{camelCase name}} = {
|
||||||
templateUrl: './{{camelCase name}}.html',
|
templateUrl: './{{dashCase name}}.html',
|
||||||
controller: {{properCase name}}Controller,
|
controller,
|
||||||
});
|
};
|
||||||
|
|
||||||
|
angular.module('portainer.{{module}}').component('{{camelCase name}}', {{camelCase name}})
|
||||||
|
|
|
@ -25,12 +25,12 @@ module.exports = function (plop) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'add',
|
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',
|
templateFile: './plop-templates/component-controller.js.hbs',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'add',
|
type: 'add',
|
||||||
path: `{{cwd}}/{{dashCase name}}/{{camelCase name}}.html`,
|
path: `{{cwd}}/{{dashCase name}}/{{dashCase name}}.html`,
|
||||||
templateFile: './plop-templates/component.html.hbs',
|
templateFile: './plop-templates/component.html.hbs',
|
||||||
},
|
},
|
||||||
], // array of actions
|
], // array of actions
|
||||||
|
|
Loading…
Reference in New Issue