<commit_before>'use strict';
var _ = require('lodash')
  , path = require('path')
  , pkg = require(path.join(__dirname, '../package.json'))
  , recursiveReaddir = require('recursive-readdir')
  , updateNotifier = require('update-notifier')
  , utils = require('../utils')
  , yeoman = require('yeoman-generator')
  , Generator;

Generator = module.exports = yeoman.generators.Base.extend({
  constructor: function () {
    yeoman.generators.Base.apply(this, arguments);
    this.name = arguments['0'][0];
  }
});

Generator.prototype.askForModuleName = function askForModuleName(params) {
  var done = this.async()
    , notifier;

  // check for updates async
  notifier = updateNotifier({
    packageName: pkg.name,
    packageVersion: pkg.version
  });

  // notifiy user about update, if there is an update
  notifier.notify();

  this.prompt([
    {
      type: 'list',
      name: 'module',
      message: 'Which module is this for?',
      default: this.config.get('lastUsedModule'),
      when: function () {
        return !(this.options && this.options.module);
      }.bind(this),
      choices: function () {
        var moduleDone = this.async();
        recursiveReaddir(utils.getAppDir(), function (err, files) {
          if (err) {
            throw err;
          }
          // remove non-script files
          // will remove folders such as fonts, images, styles
          // not 100% full proof, as a user could create a directory with a script file that's
          // not part of a module
          files = files.filter(function (file) {
            return file.indexOf('.coffee') >= 0 || file.indexOf('.js') >= 0 ||
              file.indexOf('.ts') >= 0 || file.indexOf('.es6') >= 0;
          });
          // only get the directories
          files = files.map(function (file) {
            return path.dirname(file);
          });
          // remove duplicates
          files = _.uniq(files);
          // remove components and types folder
          files = files.filter(function (file) {
            var ignoreDirectories = ['components', 'constants', 'controllers', 'directives', 'factories',
              'filters', 'services', 'providers', 'values', 'views']
              , i;
            for (i = 0; i < ignoreDirectories.length; i++) {
              if (file.indexOf(ignoreDirectories[i]) > -1) {
                return false;<commit_msg>fix(genBase) remove decorators from module listing<commit_after>'use strict';
var _ = require('lodash')
  , path = require('path')
  , pkg = require(path.join(__dirname, '../package.json'))
  , recursiveReaddir = require('recursive-readdir')
  , updateNotifier = require('update-notifier')
  , utils = require('../utils')
  , yeoman = require('yeoman-generator')
  , Generator;

Generator = module.exports = yeoman.generators.Base.extend({
  constructor: function () {
    yeoman.generators.Base.apply(this, arguments);
    this.name = arguments['0'][0];
  }
});

Generator.prototype.askForModuleName = function askForModuleName(params) {
  var done = this.async()
    , notifier;

  // check for updates async
  notifier = updateNotifier({
    packageName: pkg.name,
    packageVersion: pkg.version
  });

  // notifiy user about update, if there is an update
  notifier.notify();

  this.prompt([
    {
      type: 'list',
      name: 'module',
      message: 'Which module is this for?',
      default: this.config.get('lastUsedModule'),
      when: function () {
        return !(this.options && this.options.module);
      }.bind(this),
      choices: function () {
        var moduleDone = this.async();
        recursiveReaddir(utils.getAppDir(), function (err, files) {
          if (err) {
            throw err;
          }
          // remove non-script files
          // will remove folders such as fonts, images, styles
          // not 100% full proof, as a user could create a directory with a script file that's
          // not part of a module
          files = files.filter(function (file) {
            return file.indexOf('.coffee') >= 0 || file.indexOf('.js') >= 0 ||
              file.indexOf('.ts') >= 0 || file.indexOf('.es6') >= 0;
          });
          // only get the directories
          files = files.map(function (file) {
            return path.dirname(file);
          });
          // remove duplicates
          files = _.uniq(files);
          // remove components and types folder
          files = files.filter(function (file) {
            var ignoreDirectories = ['components', 'constants', 'controllers', 'decorators', 'directives', 'factories',
              'filters', 'services', 'providers', 'values', 'views']
              , i;
            for (i = 0; i < ignoreDirectories.length; i++) {
              if (file.indexOf(ignoreDirectories[i]) > -1) {
                return false;
{'fraction_non_alphanumeric': 0.1423820411556849, 'fraction_numerical': 0.004988567865308668, 'mean_word_length': 2.316333563059959, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '2831774', 'n_tokens_mistral': 1381, 'n_tokens_neox': 1331, 'n_words': 355}