Skip to content

Commit a0d53b0

Browse files
author
JelteMX
committed
Fix #16, removed repository & github field (not used right now)
1 parent ac0d885 commit a0d53b0

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

generators/app/index.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff 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';

generators/app/templates/_package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,8 @@
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
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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",

0 commit comments

Comments
 (0)