Skip to content

Commit 106aa16

Browse files
committed
fix for current version
1 parent e22a63d commit 106aa16

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A Yeoman generator to scaffold a [Angular Schema Form](http://schemaform.io/) Ad
55

66
Install
77
---------------
8-
`npm install -g yo generator-angular-schema-form-add-on`
8+
`npm install -g yo gulp bower generator-angular-schema-form-add-on`
99

1010
Usage
1111
---------------

app/index.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ module.exports = generators.Base.extend({
8181
var schema = this.fs.read(this.templatePath(this.addon.type + '/schema.json'));
8282
var form = this.fs.read(this.templatePath(this.addon.type + '/form.json'));
8383

84+
/* Just a fast and easy fix.. because current version isn't working */
85+
form = JSON.parse(form);
86+
if (form[0].hasOwnProperty('type')) {
87+
form[0].type = this.addon.typeName;
88+
}
89+
8490
this.addon.files.base.forEach(function(file) {
8591
// what to inject in the test controller
8692
var testModule = ['schemaForm'];
@@ -102,7 +108,7 @@ module.exports = generators.Base.extend({
102108
typeName: this.addon.typeName,
103109
paramName: this.addon.paramName,
104110
schema: schema,
105-
form: form
111+
form: JSON.stringify(form)
106112
}
107113
);
108114
}.bind(this));
@@ -129,10 +135,6 @@ module.exports = generators.Base.extend({
129135

130136
},
131137

132-
conflicts: function() {
133-
134-
},
135-
136138
install: function() {
137139
var npmDevDeps = [
138140
"gulp",

app/templates/input/form.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"type": "<%= typeName %>",
3+
"type": "",
44
"key": "name",
55
"myOwnFormOption": "Hello world!"
66
}

0 commit comments

Comments
 (0)