File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ A Yeoman generator to scaffold a [Angular Schema Form](http://schemaform.io/) Ad
55
66Install
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
1010Usage
1111---------------
Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff line change 11[
22 {
3- "type" : " <%= typeName %> " ,
3+ "type" : " " ,
44 "key" : " name" ,
55 "myOwnFormOption" : " Hello world!"
66 }
You can’t perform that action at this time.
0 commit comments