'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 the good ' + chalk.red('generator-eslint-init') + ' generator!'
    ));

    var prompts = [{
      type: 'confirm',
      name: 'someOption',
      message: 'Would you like to enable this option?',
      default: true
    }];

    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('dummyfile.txt'),
      this.destinationPath('dummyfile.txt')
    );
  },

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

@@ -1,17 +1,36 @@
-'use strict';
+/* eslint-disable func-names */%0A
 %0Avar
@@ -76,62 +76,526 @@
 var 
-chalk = require('chalk
+objectAssign = require('object-assign
 ');%0A
+%0A
 var 
-yosay = require('yosay')
+merge = objectAssign.bind(null, %7B%7D);%0Avar stringify = function stringify(obj) %7B return JSON.stringify(obj, null, 2); %7D;%0Avar parse = JSON.parse.bind(JSON);%0Avar concat = function concat(arr1, arr2, arr3) %7B return %5B%5D.concat(arr1, arr2, arr3); %7D;%0Avar prefixConfigs = function prefixConfigs(name) %7B return 'eslint-config-' + name; %7D;%0Avar prefixPlugins = function prefixPlugins(name) %7B return 'eslint-plugin-' + name; %7D;%0Avar endline = function endline(str) %7B return str + '%5Cn'; %7D
 ;%0A%0Am
@@ -648,17 +648,19 @@
 %7B%0A  
-prompting
+constructor
 : fu
@@ -657,33 +657,32 @@
 ructor: function
- 
 () %7B%0A    var don
@@ -678,674 +678,1191 @@
     
-var done = this.async(
+yeoman.generators.Base.apply(this, arguments
 );%0A
-%0A
     
-// Have Yeoman greet the user.%0A    this.log(yosay(%0A      'Welcome to the good ' + chalk.red('generator-eslint-init') + ' generator!'
+this.argument('configs', %7B type: Array, required: false,%0A      desc: endline('Configs list: %22yo eslint-init airbnb%22'),%0A    %7D);%0A    this.argument('plugins', %7B type: Array, required: false,%0A      desc: endline('Plugins list: %22yo eslint-init -p require-path-exists%22'),
 %0A    
-)
+%7D
 );%0A
-%0A
   
-  var prompts = %5B%7B%0A      type: 'confirm',%0A      name: 'someOption',%0A      message: 'Would you like to enable this option?',%0A      default: true%0A    %7D%5D;%0A%0A    this.prompt(prompts, function (props) %7B%0A      this.props = props;%0A      // To access props later use this.props.someOption;%0A%0A      done();%0A    %7D.bind(this));%0A  %7D,%0A%0A  writing: function () %7B%0A    this.fs.copy(%0A      this.templatePath('dummyfile.txt'),%0A      this.destinationPath('dummyfile.txt')%0A    );%0A  %7D,%0A%0A  install: function (
+%7D,%0A  writing: %7B%0A    app: function() %7B%0A      var config = this.options.config;%0A      var configs = this.configs %7C%7C config.configs %7C%7C %5B%5D;%0A      var plugins = this.plugins %7C%7C config.plugins %7C%7C %5B%5D;%0A      this.devDepsToInstall = concat(%0A        %5B'eslint'%5D,%0A        configs.map(prefixConfigs),%0A        plugins.map(prefixPlugins)%0A      );%0A      this.fs.write(%0A        this.destinationPath('.eslintrc.json'),%0A        endline(stringify(%7B%0A          extends: (configs.length === 1) ? configs%5B0%5D : configs,%0A          plugins: plugins,%0A        %7D))%0A      );%0A    %7D,%0A  %7D,%0A  conflicts: function conflicts() %7B%0A    // it%E2%80%99s not %22install%22 because generated project can use %22prepublish%22 script%0A    // and then babel should already exists in the generated project%0A    var skipInstall = this.options%5B'skip-install'%5D;%0A    var needInstall = !skipInstall;%0A    if (needInstall
 ) %7B%0A    
 this
@@ -1861,39 +1861,82 @@
     
+ 
+ 
 this.
-i
+npmI
 nstall
-Dependencies(
+(this.devDepsToInstall, %7B 'save-dev': true %7D
 );%0A  
+ 
-%7D
+ %7D%0A  %7D,
 %0A%7D);

rewrite generator