<commit_before>'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var _s = require('underscore.string');
var mkdirp = require('mkdirp');

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

    // Have Yeoman greet the user.
    this.log(yosay(
      'Welcome to the laudable ' + chalk.red('generator-happy') + ' generator!'
    ));

    var subgeneratorList = [
        'prestamodule',
        'prestasite'
    ];
    var prompts = [{
      type: 'list',
      name: 'subgenerator',
      message:'What do you want to do ?',
      default: 0,
      choices: subgeneratorList,
    }];

    this.prompt(prompts, function (props) {
      this.props = props;

      // To access props later use this.props.moduleName;
      done();
    }.bind(this));
  },
  main: function(){
    this.log(this.props.subgenerator);
    this.composeWith("happy:"+this.props.subgenerator, {
      options: {
        nested: true,
        appName: this.appName
      }
    }, {
      local: require.resolve("./../"+this.props.subgenerator)
    });
  },
  install: function () {
    this.installDependencies();
  }
});<commit_msg>Improve main generator<commit_after>'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var _s = require('underscore.string');
var mkdirp = require('mkdirp');

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

    // Have Yeoman greet the user.
    //
    this.log(chalk.green('           \n        ###    \n      #######  \n     ######### \n     ## ### ## \n    ### ### ###\n    ### ### ###\n    ###########\n      #######  \n        ####   \n               \n    '));

    var subgeneratorList = [
      {name:"An awesome prestashop module", value:'prestamodule'},
      {name:"Start a new prestashop project "+ chalk.yellow('- this is not yet available, submit a PR -'), value:'prestasite'},
      {name:"Construct an awesome build.xml for ant tasks", value:'ant-build'},
    ];
    var prompts = [{
      type: 'list',
      name: 'subgenerator',
      message:'What do you want to do ?',
      default: 0,
      choices: subgeneratorList,
    }];

    this.prompt(prompts, function (props) {
      this.props = props;

      // To access props later use this.props.moduleName;
      done();
    }.bind(this));
  },
  main: function(){
    this.log(this.props.subgenerator);
    this.composeWith("happy:"+this.props.subgenerator, {
      options: {
        nested: true,
        appName: this.appName
      }
    }, {
      local: require.resolve("./../"+this.props.subgenerator)
    });
  },
  install: function () {
    //this.installDependencies();
    //
    //On this switcher, no dependencies required.
  }
});
{'fraction_non_alphanumeric': 0.17486910994764399, 'fraction_numerical': 0.0006980802792321117, 'mean_word_length': 2.4655380894800483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2450918', 'n_tokens_mistral': 920, 'n_tokens_neox': 890, 'n_words': 205}