var generators = require('yeoman-generator');
var path = require('path');
module.exports = generators.Base.extend({
  promptProjectType: function() {
    var that = this;
    var done = this.async();

    this.prompt([{
      type: 'confirm',
      name: 'win10',
      message: 'Developing on Windows 10?',
      default: true
    }, {
      type: 'confirm',
      name: 'deps',
      message: 'Automatically install dependencies?',
      default: true
    }], function (answers) {
      that._win10 = answers.win10;
      that._deps = answers.deps;
      done();
    });
  },

  promptProjectInfo: function() {
    var that = this;
    var done = this.async();

    this.prompt([{
      type: 'input',
      name: 'name',
      message: 'Project name?',
      default: 'Contoso App'
    }, {
      type: 'input',
      name: 'author',
      message: 'Author name?',
      store: true,
      default: ''
    }], function (answers) {
      that._name = answers.name;
      that._author = answers.author;
      done();
    });
  },

  copyTemplate: function() {
    var gulpDir = path.join(require.resolve('gulp-appx/package.json'), '../');
    if (this._win10) {
      this.fs.copy(this.templatePath(gulpDir) + '/**/{*,.*}', this.destinationPath(), {dot: true});
    } else {
      this.fs.copy(this.templatePath(gulpDir) + '/{,*,.*,gulpfile.js/*,gulpfile.js/tasks/**/*,gulpfile.js/util/**/*,src/**/*,src/**/.*}', this.destinationPath() + '/', {dot: true});
    }
    this.fs.move(this.destinationPath('.npmignore'), this.destinationPath('.gitignore'));
  },

  install: function() {
    if (this._deps) {
      this.installDependencies({bower: false});
    }
  }
});

@@ -576,461 +576,8 @@
 %7D,%0A%0A
-  promptProjectInfo: function() %7B%0A    var that = this;%0A    var done = this.async();%0A%0A    this.prompt(%5B%7B%0A      type: 'input',%0A      name: 'name',%0A      message: 'Project name?',%0A      default: 'Contoso App'%0A    %7D, %7B%0A      type: 'input',%0A      name: 'author',%0A      message: 'Author name?',%0A      store: true,%0A      default: ''%0A    %7D%5D, function (answers) %7B%0A      that._name = answers.name;%0A      that._author = answers.author;%0A      done();%0A    %7D);%0A  %7D,%0A%0A
   co

remove unused prompts