<commit_before>/**
 * Adds a new component to the project.
 * @module AddcomponentGenerator
 * @requires chalk
 * @requires mkdirp
 * @requires underscore.string
 * @requires yeoman-generator
 * @author <EMAIL>
 */

'use strict';

var

chalk = require('chalk'),
mkdirp = require('mkdirp'),
string = require('underscore.string'),
yeoman = require('yeoman-generator'),
lineNumber = require('line-number'),

AddcomponentGenerator = yeoman.Base.extend({

  /**
   * Loads package.json and binds events.
   * @function init
   * @private
   */<commit_msg>[BUGFIX] add required arguments to addcomponent<commit_after>/**
 * Adds a new component to the project.
 * @module AddcomponentGenerator
 * @requires chalk
 * @requires mkdirp
 * @requires underscore.string
 * @requires yeoman-generator
 * @author <EMAIL>
 */

'use strict';

var

chalk = require('chalk'),
mkdirp = require('mkdirp'),
string = require('underscore.string'),
yeoman = require('yeoman-generator'),
lineNumber = require('line-number'),

AddcomponentGenerator = yeoman.Base.extend({

  /**
   * Sets required arguments.
   * @function constructor
   * @private
   */
  constructor: function () {
    yeoman.Base.apply(this, arguments);

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

    // take care of error handling
    this.on('error', function(message) {
      // print error message
      this.log.error(message);
      // exit shell
      process.exit(5);
    });

  },
  /**
   * Loads package.json and binds events.
   * @function init
   * @private
   */
{'fraction_non_alphanumeric': 0.1418706842435656, 'fraction_numerical': 0.0006277463904582549, 'mean_word_length': 3.403314917127072, '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': '1639607', 'n_tokens_mistral': 498, 'n_tokens_neox': 474, 'n_words': 124}