<commit_before>/**
 * Wrapper around the JSDoc parser
 * @module JSDoc
 */

//
// Run the script in strict mode.
//
'use strict';

//
// Required modules.
//
var path = require('path');

/**
 * JSDoc wrapper constructor.
 *
 * @alias module:JSDoc
 * @constructor
 * @param {Object} options
 * @public
 */
function JSDoc(options) {
  options = options || {};

  //
  // Prepare global options for JSDoc...
  //
  global.env = {
    dirname: path.resolve(__dirname, '../node_modules/jsdoc'),
    conf: {},
    opts: {}
  };

  global.app = {
    jsdoc: {}
  };
}

/**
 * Execute the JSDoc comment parses with the haruki template to generate JSON
 *
 * @returns {Object} parsed JSON reprensentation of public comments.
 * @public
 */
JSDoc.prototype.execute = function execute(files, fn) {
  global.env.sourceFiles = files;

  //
  //
  //
  var parser = require('../node_modules/jsdoc/cli.js');
  parser.createParser().parseFiles().processParseResults();

  fn(null, files);
};
<commit_msg>[minor] working jsdoc output now catch output<commit_after>/**
 * Wrapper around the JSDoc parser
 * @module JSDoc
 */

//
// Run the script in strict mode.
//
'use strict';

//
// Required modules.
//
var path = require('path')
  , root = path.resolve(__dirname, '../node_modules/jsdoc');

//
// Prepare global environment options for JSDoc...
//
global.env = {
  dirname: root,
  pwd: root,
  conf: {
    tags: { allowUnknownTags: true }
  },
  opts: {
    destination: 'console',
    template: 'templates/haruki'
  }
};

global.app = {
  jsdoc: {}
};

global.dump = console.log;

/**
 * JSDoc wrapper constructor.
 *
 * @alias module:JSDoc
 * @constructor
 * @param {Object} options
 * @public
 */
function JSDoc(options) {
  options = options || {};
}

/**
 * Execute the JSDoc comment parses with the haruki template to generate JSON
 *
 * @returns {Object} parsed JSON reprensentation of public comments.
 * @public
 */
JSDoc.prototype.execute = function execute(files, fn) {
  global.env.sourceFiles = files.map(function paths(file) {
    return file.fullPath;
  });

  //
  //
  //
  var parser = require('../node_modules/jsdoc/cli.js');
  parser.createParser().parseFiles().processParseResults();

  fn(null, files);
};

{'fraction_non_alphanumeric': 0.16102841677943167, 'fraction_numerical': 0.0, 'mean_word_length': 2.9963963963963964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3049567', 'n_tokens_mistral': 738, 'n_tokens_neox': 727, 'n_words': 185}