File tree Expand file tree Collapse file tree 3 files changed +7
-18
lines changed Expand file tree Collapse file tree 3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,10 @@ module.exports = yeoman.Base.extend({
5050 this . current . author = destPkg . author ;
5151 this . current . copyright = destPkg . copyright ;
5252 this . current . license = destPkg . license ;
53- this . current . repository = destPkg . repository ? JSON . stringify ( destPkg . repository ) : false ;
54- } catch ( e ) { }
53+ } catch ( e ) {
54+ console . error ( "Error reading package.json. Please check the file or remove it before you run the generator again. Error: " + e . toString ( ) ) ;
55+ process . exit ( 1 ) ;
56+ }
5557 }
5658 if ( ! extfs . isEmptySync ( this . destinationPath ( 'src/package.xml' ) ) ) {
5759 this . isNew = false ;
@@ -131,12 +133,6 @@ module.exports = yeoman.Base.extend({
131133 message : 'Author' ,
132134 default : '<You>' ,
133135 store : true
134- } , {
135- type : 'input' ,
136- name : 'github' ,
137- message : 'Github username (optional)' ,
138- default : '<none>' ,
139- store : true
140136 }
141137 ] ;
142138
@@ -212,8 +208,6 @@ module.exports = yeoman.Base.extend({
212208 this . widget . copyright = this . props . copyright || this . current . copyright ;
213209 this . widget . license = this . props . license || this . current . license ;
214210 this . widget . generatorVersion = pkg . version ;
215- this . widget . github = ( this . props . github !== '<none>' && typeof this . props . github !== 'undefined' ) ? '"http://github.com/' + this . props . github + '/' + this . widget . widgetName + '"' : false ;
216- this . widget . repository = this . current . repository || false ;
217211
218212 // Using grunt (future version will include Gulp)
219213 this . widget . builder = 'grunt' ;
Original file line number Diff line number Diff line change 1919 "shelljs" : " ^0.7.0" ,
2020 "xml2js" : " ^0.4.15" ,
2121 "semver" : " ^5.1.0" ,
22- "node-mendix-modeler-path" : " https://github.com/JelteMX/node-mendix-modeler-path/archive/v1.0.0.tar.gz" <% } if (builder == 'gulp') { %><% } %>
23- },<% if (github) { %>
24- "repository" : {
25- "type" : " git" ,
26- "url" : <%= github %>
27- },<% } %><% if (repository) { %>
28- "repository" : <%= repository %>,<% } %>
22+ "node-mendix-modeler-path" : " https://github.com/JelteMX/node-mendix-modeler-path/archive/v1.0.0.tar.gz"
23+ },<% } if (builder == 'gulp') { %><% } %>
2924 "engines" : {
3025 "node" : " >=0.12.0"
3126 },
Original file line number Diff line number Diff line change 11{
22 "name" : " generator-mendix" ,
3- "version" : " 1.3.6 " ,
3+ "version" : " 1.3.7 " ,
44 "description" : " Mendix Widget generator" ,
55 "license" : " MIT" ,
66 "main" : " app/index.js" ,
You can’t perform that action at this time.
0 commit comments