Skip to content

Commit

Permalink
Fix #16, removed repository & github field (not used right now)
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteMX committed Jun 30, 2016
1 parent ac0d885 commit a0d53b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
14 changes: 4 additions & 10 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ module.exports = yeoman.Base.extend({
this.current.author = destPkg.author;
this.current.copyright = destPkg.copyright;
this.current.license = destPkg.license;
this.current.repository = destPkg.repository ? JSON.stringify(destPkg.repository) : false;
} catch (e) {}
} catch (e) {
console.error("Error reading package.json. Please check the file or remove it before you run the generator again. Error: " + e.toString());
process.exit(1);
}
}
if (!extfs.isEmptySync(this.destinationPath('src/package.xml'))) {
this.isNew = false;
Expand Down Expand Up @@ -131,12 +133,6 @@ module.exports = yeoman.Base.extend({
message: 'Author',
default: '<You>',
store: true
},{
type: 'input',
name: 'github',
message: 'Github username (optional)',
default: '<none>',
store: true
}
];

Expand Down Expand Up @@ -212,8 +208,6 @@ module.exports = yeoman.Base.extend({
this.widget.copyright = this.props.copyright || this.current.copyright;
this.widget.license = this.props.license || this.current.license;
this.widget.generatorVersion = pkg.version;
this.widget.github = (this.props.github !== '<none>' && typeof this.props.github !== 'undefined') ? '"http://github.com/' + this.props.github + '/' + this.widget.widgetName + '"' : false;
this.widget.repository = this.current.repository || false;

// Using grunt (future version will include Gulp)
this.widget.builder = 'grunt';
Expand Down
9 changes: 2 additions & 7 deletions generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@
"shelljs": "^0.7.0",
"xml2js": "^0.4.15",
"semver": "^5.1.0",
"node-mendix-modeler-path": "https://github.com/JelteMX/node-mendix-modeler-path/archive/v1.0.0.tar.gz"<% } if (builder == 'gulp') { %><% } %>
},<% if (github) { %>
"repository": {
"type": "git",
"url": <%= github %>
},<% } %><% if (repository) { %>
"repository": <%= repository %>,<% } %>
"node-mendix-modeler-path": "https://github.com/JelteMX/node-mendix-modeler-path/archive/v1.0.0.tar.gz"
},<% } if (builder == 'gulp') { %><% } %>
"engines": {
"node": ">=0.12.0"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-mendix",
"version": "1.3.6",
"version": "1.3.7",
"description": "Mendix Widget generator",
"license": "MIT",
"main": "app/index.js",
Expand Down

0 comments on commit a0d53b0

Please sign in to comment.