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

module.exports = yeoman.generators.Base.extend({
  initializing: function () {
    this.pkg = require('../package.json');
  },

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

    // Yeoman greeting
    this.log(yosay(
      'Yo! I\'m here to help build your ' + chalk.red('Angular2') + ' application.'
    ));

    var prompts = [{
      type: 'list',
      name: 'transpiler',
      message: 'Which transpiler would you like to use?',
      default: 'Babel',
      choices: ['Babel', 'Traceur']
    }];

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

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

  writing: {
    app: function () {
      this.fs.copy(
        this.templatePath('_package.json'),
        this.destinationPath('package.json')
      );
    },

    projectfiles: function () {
      this.fs.copy(
        this.templatePath('editorconfig'),
        this.destinationPath('.editorconfig')
      );
    }
  },

  install: function () {
    this.installDependencies({
      skipInstall: this.options['skip-install']
    });
  }
});<commit_msg>add transpiler to dev dependencies<commit_after>'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');

module.exports = yeoman.generators.Base.extend({
  initializing: function () {
    // this.npmInstall(['angular2'], { 'saveDev': true });
  },

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

    // Yeoman greeting
    this.log(yosay(
      'Yo! I\'m here to help build your ' + chalk.red('Angular2') + ' application.'
    ));

    var prompts = [{
      type: 'list',
      name: 'transpiler',
      message: 'Which transpiler would you like to use?',
      default: 'Babel',
      choices: ['Babel', 'Traceur']
    }];

    this.prompt(prompts, function (props) {
      this.transpiler = props.transpiler;
      if (this.transpiler === 'Babel') {
        this.npmInstall(['babel'], { 'saveDev': true });
      } else if (this.transpiler === 'Traceur') {
        this.npmInstall(['traceur'], { 'saveDev': true });
      }
      done();
    }.bind(this));
  },

  writing: {
    app: function () {
      this.fs.copy(
        this.templatePath('_package.json'),
        this.destinationPath('package.json')
      );
    },

    projectfiles: function () {
      this.fs.copy(
        this.templatePath('editorconfig'),
        this.destinationPath('.editorconfig')
      );
    }
  },

  install: function () {
    this.installDependencies({
      bower: false,
      skipInstall: this.options['skip-install']
    });
  }
});
{'fraction_non_alphanumeric': 0.16978364503116977, 'fraction_numerical': 0.0011001100110011, 'mean_word_length': 2.5894736842105264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '7003643', 'n_tokens_mistral': 882, 'n_tokens_neox': 848, 'n_words': 172}