<commit_before>'use strict';

const Generator = require('yeoman-generator');
const Batangularjs = require('../core');

module.exports = class extends Generator {
  constructor(args, opts) {
    super(args, opts);

    this.args = args;
    this.opts = opts;
  }

  validateArgs() {
    if (!this.args.length) {
      this.env.error('Sintax error, you must use the sintax: batangularjs:module <module> [-r]');
      return;
    }
    this.modulePath = this.args[0];
    this.moduleName = Batangularjs.upperCaseFirst(
      Batangularjs.namePath(this.modulePath)
    );
  }

  writing() {
    this.fs.copyTpl(
      this.templatePath('module.js'),
      this.destinationPath(`${Batangularjs.fileDirPath(this.modulePath, 'module', true)}`),
      {
        moduleName: this.moduleName,
        capitalizeModuleName: Batangularjs.upperCaseFirst(this.moduleName),
        route: this.opts.r
      }
    );
  }
};<commit_msg>refactor(module): Create opt route variable<commit_after>'use strict';

const Generator = require('yeoman-generator');
const Batangularjs = require('../core');

module.exports = class extends Generator {
  constructor(args, opts) {
    super(args, opts);

    this.args = args;
    this.opts = opts;
  }

  validateArgs() {
    if (!this.args.length) {
      this.env.error('Sintax error, you must use the sintax: batangularjs:module <module> [-r]');
      return;
    }
    this.modulePath = this.args[0];
    this.moduleName = Batangularjs.upperCaseFirst(
      Batangularjs.namePath(this.modulePath)
    );
    this.optRoute = this.opts.r;
  }

  writing() {
    this.fs.copyTpl(
      this.templatePath('module.js'),
      this.destinationPath(`${Batangularjs.fileDirPath(this.modulePath, 'module', true)}`),
      {
        moduleName: this.moduleName,
        capitalizeModuleName: Batangularjs.upperCaseFirst(this.moduleName),
        route: this.optRoute
      }
    );
  }
};
{'fraction_non_alphanumeric': 0.14240672622175513, 'fraction_numerical': 0.0010509721492380452, 'mean_word_length': 3.121212121212121, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '893073', 'n_tokens_mistral': 617, 'n_tokens_neox': 608, 'n_words': 108}