<commit_before>/**
 * @file        Main file of Yeoman generator for React web
 * @author      <NAME> <<EMAIL>>
 * @copyright   2016 <NAME>
 * @license     MIT
 */

/* eslint-disable */

'use strict';

var generators = require('yeoman-generator'),
    chalk      = require('chalk'),
    yosay      = require('yosay'),
    _          = require('lodash');

module.exports = generators.Base.extend({
    prompting: function () {
        this.log(yosay('Welcome to the ' + chalk.green('React web') + ' generator!'));

        var prompts = [
            {
                type: 'input',
                name: 'name',
                message: 'Your project name (use kebab-case)',
                default: _.kebabCase(this.appname)
            }
        ];

        return this.prompt(prompts).then(function (props) {
            this.props = props;
        }.bind(this));
    },

    writing: function () {
        // copy all files except .gitignore and package.json
        this.fs.copy(
            this.templatePath('**/!(.gitignore|.npmignore|package.json)'),
            this.destinationPath(), { globOptions: { dot: true } }
        );

        // copy .gitignore
        if (this.fs.exists(this.templatePath('.npmignore'))) {
            this.fs.copy(
                this.templatePath('.npmignore'),
                this.destinationPath('.gitignore')
            );
        } else {
            this.fs.copy(
                this.templatePath('.gitignore'),
                this.destinationPath('.gitignore')
            );
        }

        // copy package.json
        this.fs.copyTpl(
            this.templatePath('package.json'),
            this.destinationPath('package.json'),
            { name: _.kebabCase(this.props.name) }
        );
    },

    install: function () {
        this.runInstall('yarn');
    }
});<commit_msg>Update yeoman script<commit_after>/**
 * @file        Main file of Yeoman generator for React web
 * @author      <NAME> <<EMAIL>>
 * @copyright   2016 <NAME>
 * @license     MIT
 */

const Generator = require('yeoman-generator');
const chalk = require('chalk');
const yosay = require('yosay');
const _ = require('lodash');

module.exports = class extends Generator {
    prompting() {
        this.log(yosay(`Welcome to the ${chalk.green('React Web')} Generator!`));

        const prompts = [
            {
                type: 'input',
                name: 'name',
                message: 'Your project name (use kebab-case)',
                default: _.kebabCase(this.appname)
            }
        ];

        return this.prompt(prompts).then((props) => {
            this.props = props;
        });
    }

    writing() {
        // copy all files except .gitignore and package.json
        this.fs.copy(
            this.templatePath('**/!(.gitignore|.npmignore|package.json)'),
            this.destinationPath(), { globOptions: { dot: true } }
        );

        // copy .gitignore
        if (this.fs.exists(this.templatePath('.npmignore'))) {
            this.fs.copy(
                this.templatePath('.npmignore'),
                this.destinationPath('.gitignore')
            );
        } else {
            this.fs.copy(
                this.templatePath('.gitignore'),
                this.destinationPath('.gitignore')
            );
        }

        // copy package.json
        this.fs.copyTpl(
            this.templatePath('package.json'),
            this.destinationPath('package.json'),
            { name: _.kebabCase(this.props.name) }
        );
    }

    install() {
        this.runInstall('yarn');
    }
};
{'fraction_non_alphanumeric': 0.14580429328129357, 'fraction_numerical': 0.002230275996654586, 'mean_word_length': 1.6676579925650559, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '6088586', 'n_tokens_mistral': 1043, 'n_tokens_neox': 987, 'n_words': 189}