diff --git a/generators/app/index.js b/generators/app/index.js index 9818e5c..13991b2 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -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; @@ -131,12 +133,6 @@ module.exports = yeoman.Base.extend({ message: 'Author', default: '', store: true - },{ - type: 'input', - name: 'github', - message: 'Github username (optional)', - default: '', - store: true } ]; @@ -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 !== '' && 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'; diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json index e12fa09..25077bc 100644 --- a/generators/app/templates/_package.json +++ b/generators/app/templates/_package.json @@ -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" }, diff --git a/package.json b/package.json index 05b04a0..85b91f3 100644 --- a/package.json +++ b/package.json @@ -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",