<commit_before>import Generator from 'yeoman-generator';
import shell from 'shelljs';
import chalk from 'chalk';
import ora from 'ora';
import path from 'path';
import fs from 'fs';

import logo from '../graphql-logo';

const tic = chalk.green('✓');
const tac = chalk.red('✗');
const commitHash = '4a0eab74f021bac16e626c0ebc9fddec3d4d8c7e';

class AppGenerator extends Generator {
  constructor(args, options) {
    super(args, options);

    this.argument('name', {
      type: String,
      required: true,
    });

    this.dir = path.resolve(this.options.name);
  }

  initializing() {
    this.spinner = ora();

    this._printGraphQLLogo();
  }

  cloneStarterCode() {
    this.spinner.start();

    this._validateDirectory();

    this.spinner.text = 'Creating a new GraphQL project...';

    const repository = 'https://github.com/entria/graphql-dataloader-boilerplate.git';

    const done = this.async();
    const command = 'git';
    const commandOpts = ['clone', repository, this.dir];
    const checkoutCommandOpts = ['checkout', commitHash];
    
    this.spawnCommand(command, commandOpts, { stdio: 'ignore' })
      .on('close', () => {
        shell.cd(this.dir);

        this.spawnCommand(command, checkoutCommandOpts, { stdio: 'ignore' })
          .on('close', () => {
            this.spinner.stop();
            
            this.log(`${tic} GraphQL project ${this.options.name} created.`);
            
            done();    <commit_msg>Removed trailing spaces for ESLint<commit_after>import Generator from 'yeoman-generator';
import shell from 'shelljs';
import chalk from 'chalk';
import ora from 'ora';
import path from 'path';
import fs from 'fs';

import logo from '../graphql-logo';

const tic = chalk.green('✓');
const tac = chalk.red('✗');
const commitHash = '4a0eab74f021bac16e626c0ebc9fddec3d4d8c7e';

class AppGenerator extends Generator {
  constructor(args, options) {
    super(args, options);

    this.argument('name', {
      type: String,
      required: true,
    });

    this.dir = path.resolve(this.options.name);
  }

  initializing() {
    this.spinner = ora();

    this._printGraphQLLogo();
  }

  cloneStarterCode() {
    this.spinner.start();

    this._validateDirectory();

    this.spinner.text = 'Creating a new GraphQL project...';

    const repository = 'https://github.com/entria/graphql-dataloader-boilerplate.git';

    const done = this.async();
    const command = 'git';
    const commandOpts = ['clone', repository, this.dir];
    const checkoutCommandOpts = ['checkout', commitHash];

    this.spawnCommand(command, commandOpts, { stdio: 'ignore' })
      .on('close', () => {
        shell.cd(this.dir);

        this.spawnCommand(command, checkoutCommandOpts, { stdio: 'ignore' })
          .on('close', () => {
            this.spinner.stop();

            this.log(`${tic} GraphQL project ${this.options.name} created.`);

            done();
{'fraction_non_alphanumeric': 0.1509433962264151, 'fraction_numerical': 0.012349914236706689, 'mean_word_length': 3.0783216783216782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1991132', 'n_tokens_mistral': 966, 'n_tokens_neox': 924, 'n_words': 206}