<commit_before>'use strict';

var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var npmCheck = require('npm-check');
var path = require('path');
var yosay = require('yosay');

module.exports = yeoman.generators.Base.extend({
  constructor: function() {
    yeoman.generators.Base.apply(this, arguments);
    // add option to skip install
    this.option('skip-install');
    this.argument('appname', {
      type: String,
      required: false
    });
    this.appname = this.appname || path.basename(process.cwd());
  },

  prompting: function() {
    // Yeoman greeting
    this.log(yosay(
      'Yo! I\'m here to help build your ' +
      chalk.bold.yellow('Angular2') +
      ' application.'
    ));
  },

  writing: {
    app: function() {
      this.basicTemplate = 'src/' + this._.slugify(this.appname) +
        '.html';

      this.copy('_package.json', 'package.json');
      this.copy('_gulpfile.js', 'gulpfile.js');
      this.copy('_readme.md', 'readme.md');
      this.copy('_editorconfig', '.editorconfig');
      this.copy('_gitignore', '.gitignore');

      this.mkdir('src');
      this.copy('src/_index.js', 'src/index.js');
      this.copy('src/_index.html', 'src/index.html');
      this.copy('src/_basic-template.html', this.basicTemplate);
    }
  },

  install: function() {
    this.installDependencies({
      skipInstall: this.options['skip-install'],
      bower: false,
      callback: function() {
        this.emit('dependenciesInstalled');
      }.bind(this)
    });

    this.on('dependenciesInstalled', function() {
      npmCheck({
        global: true
      }).then(function(globalPackages) {
        if (!globalPackages.gulp) {
          return './node_modules/.bin/gulp';
        }
        return 'gulp';
      }).then(function(gulpCommand) {
        this.spawnCommand(gulpCommand).on('close', function() {
          this.log('');
          this.log('');<commit_msg>copy basic template for js too<commit_after>'use strict';

var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var npmCheck = require('npm-check');
var path = require('path');
var yosay = require('yosay');

module.exports = yeoman.generators.Base.extend({
  constructor: function() {
    yeoman.generators.Base.apply(this, arguments);
    // add option to skip install
    this.option('skip-install');
    this.argument('appname', {
      type: String,
      required: false
    });
    this.appname = this.appname || path.basename(process.cwd());
  },

  prompting: function() {
    // Yeoman greeting
    this.log(yosay(
      'Yo! I\'m here to help build your ' +
      chalk.bold.yellow('Angular2') +
      ' application.'
    ));
  },

  writing: {
    app: function() {
      this.basicTemplate = 'src/' + this._.slugify(this.appname);

      this.copy('_package.json', 'package.json');
      this.copy('_gulpfile.js', 'gulpfile.js');
      this.copy('_readme.md', 'readme.md');
      this.copy('_editorconfig', '.editorconfig');
      this.copy('_gitignore', '.gitignore');

      this.mkdir('src');
      this.copy('src/_index.js', 'src/index.js');
      this.copy('src/_index.html', 'src/index.html');
      this.copy('src/_basic-template.html', this.basicTemplate + '.html');
      this.copy('src/_basic-template.js', this.basicTemplate + '.js');
    }
  },

  install: function() {
    this.installDependencies({
      skipInstall: this.options['skip-install'],
      bower: false,
      callback: function() {
        this.emit('dependenciesInstalled');
      }.bind(this)
    });

    this.on('dependenciesInstalled', function() {
      npmCheck({
        global: true
      }).then(function(globalPackages) {
        if (!globalPackages.gulp) {
          return './node_modules/.bin/gulp';
        }
        return 'gulp';
      }).then(function(gulpCommand) {
        this.spawnCommand(gulpCommand).on('close', function() {
          this.log('');
          this.log('');
{'fraction_non_alphanumeric': 0.17726347914547305, 'fraction_numerical': 0.000508646998982706, 'mean_word_length': 2.7817307692307693, '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': '7337296', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1232, 'n_words': 213}