From f964dcb17f08fb77a985a3403bd90695e8ed25e9 Mon Sep 17 00:00:00 2001 From: cueedee Date: Wed, 11 Mar 2015 16:31:59 +0100 Subject: [PATCH] feat(app generator): loose the marviq-tied default author url, and ask the user for it instead --- generators/app/index.js | 7 +++++++ generators/app/templates/_package.json | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/generators/app/index.js b/generators/app/index.js index f43dcd83..0f3b29a3 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -42,6 +42,11 @@ module.exports = yeoman.generators.Base.extend( , message: "What is your email?" , default: this.user.git.email } + , { + name: "authorUrl" + , message: "If any, by what url would you like to be known?" + , default: "" + } // , { // name: "bootstrap" // , type: "confirm" @@ -76,12 +81,14 @@ module.exports = yeoman.generators.Base.extend( this.mainName = props.mainName; this.authorName = props.authorName; this.authorEmail = props.authorEmail; + this.authorUrl = props.authorUrl.trim(); this.bootstrap = props.bootstrap; this.ie8 = props.ie8; this.multiLanguage = props.multiLanguage; this.demo = props.demo; callback(); + }.bind( this ) ); } diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json index ec7b03dc..0234929c 100644 --- a/generators/app/templates/_package.json +++ b/generators/app/templates/_package.json @@ -1,8 +1,8 @@ { "author": { "email": "<%= authorEmail %>", - "name": "<%= authorName %>", - "url": "https://github.com/Marviq" + "name": "<%= authorName %>"<% if ( authorUrl ) { %>, + "url": "<%= authorUrl %>"<% } %> }, "browser": {}, "browserify": {