<commit_before>#!/usr/bin/env node
// ---------------------------------------------------------------------------------------------------------------------
// This script is intended to generate documentation for this module
// ---------------------------------------------------------------------------------------------------------------------

/* eslint-env node, es6 */
require('shelljs/global');

var path = require('path'),
    colors = require('colors/safe'),

    IS_WINDOWS = (/^win/).test(process.platform),
    TARGET_DIR = path.join('out', 'docs');

module.exports = function (exit) {
    console.log(colors.yellow.bold('Generating documentation...'));

    try {
        // clean directory
        test('-d', TARGET_DIR) && rm('-rf', TARGET_DIR);
    }
    catch (e) {
        console.error(e.stack || e);
        return exit(e ? 1 : 0);
    }

    exec(`${IS_WINDOWS ? '' : 'node'} ${path.join('node_modules', '.bin', 'jsdoc')}${IS_WINDOWS ? '.cmd' : ''}` +
        ' -c .jsdoc-config.json -u docs lib', function (code) {
        // output status
        console.log(code ?
            colors.red.bold('unable to genereate documentation') :
            ` - documentation created at "${TARGET_DIR}"`);
        exit(code);
    });
};

// ensure we run this script exports if this is a direct stdin.tty run
!module.parent && module.exports(exit);
<commit_msg>update postman-jsdoc-theme, which adds support for adding a package version in the docs<commit_after>#!/usr/bin/env node
// ---------------------------------------------------------------------------------------------------------------------
// This script is intended to generate documentation for this module
// ---------------------------------------------------------------------------------------------------------------------

/* eslint-env node, es6 */
require('shelljs/global');

var path = require('path'),
    colors = require('colors/safe'),
    pkg = require('../package.json'),

    IS_WINDOWS = (/^win/).test(process.platform),
    TARGET_DIR = path.join('out', 'docs');

module.exports = function (exit) {
    console.log(colors.yellow.bold('Generating documentation...'));

    try {
        // clean directory
        test('-d', TARGET_DIR) && rm('-rf', TARGET_DIR);
    }
    catch (e) {
        console.error(e.stack || e);
        return exit(e ? 1 : 0);
    }

    exec(`${IS_WINDOWS ? '' : 'node'} ${path.join('node_modules', '.bin', 'jsdoc')}${IS_WINDOWS ? '.cmd' : ''}` +
        ` -c .jsdoc-config.json -u docs lib --query 'pkgVersion=${pkg.version}'`, function (code) {
        // output status
        console.log(code ?
            colors.red.bold('unable to genereate documentation') :
            ` - documentation created at "${TARGET_DIR}"`);
        exit(code);
    });
};

// ensure we run this script exports if this is a direct stdin.tty run
!module.parent && module.exports(exit);

{'fraction_non_alphanumeric': 0.31024930747922436, 'fraction_numerical': 0.002077562326869806, 'mean_word_length': 1.572573463935886, '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': '3780098', 'n_tokens_mistral': 773, 'n_tokens_neox': 752, 'n_words': 188}