'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');

module.exports = yeoman.generators.Base.extend({
  prompting: function () {
    var done = this.async();

    // Have Yeoman greet the user.
    this.log(yosay(
      'Welcome to use Fay !'
    ));

    var prompts = [{
      type: 'confirm',
      name: 'mobile',
      message: 'Would you like to enable to add mobile app?',
      default: false
    }, {
      type: 'confirm',
      name: 'editor',
      message: 'Would you like to enable to add editor?',
      default: false
    }];

    this.prompt(prompts, function (props) {
      this.props = props;
      // To access props later use this.props.someOption;

      done();
    }.bind(this));
  },

  writing: function () {
    this.fs.copy([
        this.templatePath() + '/fay-builder/**', this.templatePath() + '/fay-builder/**/.*'],
      this.destinationPath('builder/')
    );

    this.fs.copy([
        this.templatePath() + '/fay-content/**', this.templatePath() + '/fay-content/**/.*'],
      this.destinationPath('content/')
    );

    this.fs.copy(this.templatePath('README.md'), this.destinationPath('README.md'));
    this.fs.copy(this.templatePath('package.json'), this.destinationPath('package.json'));

    if(this.props.mobile) {
      this.fs.copy([
          this.templatePath() + '/fay-mobile/**', this.templatePath() + '/fay-mobile/**/.*'],
        this.destinationPath('mobile/')
      );
    }

    if(this.props.editor) {
      console.log("======================");
    }
  },

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

@@ -53,38 +53,8 @@
 ');%0A
-var chalk = require('chalk');%0A
 var 
@@ -780,34 +780,32 @@
 fs.copy(%5B%0A      
-  
 this.templatePat
@@ -936,26 +936,24 @@
 s.fs.copy(%5B%0A
-  
       this.t
@@ -1254,32 +1254,33 @@
 json'));%0A%0A    if
+ 
 (this.props.mobi
@@ -1310,26 +1310,24 @@
 y(%5B%0A        
- 
- 
 this.templat
@@ -1456,88 +1456,8 @@
    %7D
-%0A%0A    if(this.props.editor) %7B%0A      console.log(%22======================%22);%0A    %7D
 %0A  %7D

fix test