Skip to content

Commit 4722d2d

Browse files
committed
typeName -> formType for better understanding
1 parent aa281c5 commit 4722d2d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module.exports = generators.Base.extend({
6666
*/
6767
this.addon.type = this.addon.type.toLowerCase(); // ex. Input > input
6868
this.addon.module = camelcase(this.addon.name); // ex. add on > addOn
69-
this.addon.typeName = this.addon.name.replace(/ /g, ''); // ex. add on > addon
69+
this.addon.formType = this.addon.name.replace(/ /g, ''); // ex. add on > addon
7070
this.addon.paramName = this.addon.name.replace(/ /g, '-'); // ex. add on > add-on
7171

7272
/* We are done here... Let's continue
@@ -99,7 +99,7 @@ module.exports = generators.Base.extend({
9999
*/
100100
form = JSON.parse(form);
101101
if (form[0].hasOwnProperty('type')) {
102-
form[0].type = this.addon.typeName;
102+
form[0].type = this.addon.formType;
103103
}
104104

105105
this.addon.files.base.forEach(function(file) {
@@ -122,7 +122,7 @@ module.exports = generators.Base.extend({
122122
name: this.addon.name,
123123
module: this.addon.module,
124124
testModuleInj: JSON.stringify(testModule),
125-
typeName: this.addon.typeName,
125+
formType: this.addon.formType,
126126
paramName: this.addon.paramName,
127127
schema: schema,
128128
form: JSON.stringify(form),
@@ -143,7 +143,7 @@ module.exports = generators.Base.extend({
143143
{
144144
name: this.addon.name,
145145
module: this.addon.module,
146-
typeName: this.addon.typeName,
146+
formType: this.addon.formType,
147147
paramName: this.addon.paramName,
148148
directive: this.addon.useDirective
149149
}

app/templates/input/src/module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ angular.module('<%= module %>', [
55

66
schemaFormDecoratorsProvider.defineAddOn(
77
'bootstrapDecorator', // Name of the decorator you want to add to.
8-
'<%= typeName %>', // Form type that should render this add-on
8+
'<%= formType %>', // Form type that should render this add-on
99
'src/templates/<%= paramName %>.html', // Template name in $templateCache
1010
sfBuilderProvider.stdBuilders // List of builder functions to apply.
1111
);

0 commit comments

Comments
 (0)