<commit_before>//  Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.
//
//  Redistribution and use in source and binary forms, with or without modification,
//  are permitted provided that the following conditions are met:
//  1. Redistributions of source code must retain the above copyright notice, this
//  list of conditions and the following disclaimer.
//  2. Redistributions in binary form must reproduce the above copyright notice,
//  this list of conditions and the following disclaimer in the documentation and/or
//  other materials provided with the distribution.
//  3. Neither the name of the organization nor the names of its contributors may be
//  used to endorse or promote products derived from this software without specific
//  prior written permission.

(
function(thiz){

    console.log("========>");
    console.log("========> RJS bootstrap ...");
    console.log("========>");

    //console.log(thiz);
    console.log(process.cwd());
    //console.log(process.env);

    var fs = nodeRequire("fs");
    var path = nodeRequire("path");


    var args = process.argv.slice(3);
    console.log(args);

    // relative to process.cwd(), folder that contains this config file
    var configDir = args[0];
    var i = configDir.lastIndexOf("/");
    configDir = configDir.substr(0, i).replace(/\.\//g, '');
    console.log(configDir);
    process._RJS_Path_RelCwd__ConfigDir = configDir;

    process._RJS_Path_RelCwd__ConfigDir_nSlashes
        = process._RJS_Path_RelCwd__ConfigDir.split('/').length - 1;


    var configCustomTarget = undefined;
    var configOverrideTarget = undefined;
    process._RJS_isSingleBundle = false;

    process._RJS_isUgly = true;

    // For example, command line parameter after "npm run SCRIPT_NAME":
    //--readium-js-viewer:RJS_UGLY=no
    // or:
    //--readium-shared-js:RJS_UGLY=false
    // or:
    //--readium-cfi-js:RJS_UGLY=FALSE
    //
    // ... or ENV shell variable, e.g. PowerShell:
    //Set-Item Env:RJS_UGLY no
    // e.g. OSX terminal:
    //RJS_UGLY=no npm run build
    //(temporary, command process -specific ENV variable)
    console.log('process.env.npm_package_config_RJS_UGLY:');
    console.log(process.env.npm_package_config_RJS_UGLY);
    console.log('process.env[RJS_UGLY]:');
    console.log(process.env['RJS_UGLY']);
    if (process.env.npm_package_config_RJS_UGLY)
            process.env['RJS_UGLY'] = process.env.npm_package_config_RJS_UGLY;
<commit_msg>minor comment addition for UGLY (minification) env var<commit_after>//  Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.
//
//  Redistribution and use in source and binary forms, with or without modification,
//  are permitted provided that the following conditions are met:
//  1. Redistributions of source code must retain the above copyright notice, this
//  list of conditions and the following disclaimer.
//  2. Redistributions in binary form must reproduce the above copyright notice,
//  this list of conditions and the following disclaimer in the documentation and/or
//  other materials provided with the distribution.
//  3. Neither the name of the organization nor the names of its contributors may be
//  used to endorse or promote products derived from this software without specific
//  prior written permission.

(
function(thiz){

    console.log("========>");
    console.log("========> RJS bootstrap ...");
    console.log("========>");

    //console.log(thiz);
    console.log(process.cwd());
    //console.log(process.env);

    var fs = nodeRequire("fs");
    var path = nodeRequire("path");


    var args = process.argv.slice(3);
    console.log(args);

    // relative to process.cwd(), folder that contains this config file
    var configDir = args[0];
    var i = configDir.lastIndexOf("/");
    configDir = configDir.substr(0, i).replace(/\.\//g, '');
    console.log(configDir);
    process._RJS_Path_RelCwd__ConfigDir = configDir;

    process._RJS_Path_RelCwd__ConfigDir_nSlashes
        = process._RJS_Path_RelCwd__ConfigDir.split('/').length - 1;


    var configCustomTarget = undefined;
    var configOverrideTarget = undefined;
    process._RJS_isSingleBundle = false;

    process._RJS_isUgly = true;

    // For example, command line parameter after "npm run SCRIPT_NAME":
    //--readium-js-viewer:RJS_UGLY=no
    // or:
    //--readium-js:RJS_UGLY=NO
    // or:
    //--readium-shared-js:RJS_UGLY=false
    // or:
    //--readium-cfi-js:RJS_UGLY=FALSE
    //
    // ... or ENV shell variable, e.g. PowerShell:
    //Set-Item Env:RJS_UGLY no
    // e.g. MS-DOS:
    //SET RJS_UGLY=no 
    // e.g. OSX terminal:
    //RJS_UGLY=no npm run build
    //(temporary, command / process-specific ENV variable)
    // or:
    // export RJS_UGLY="false"; npm run build
    //(permanent env var)
    console.log('process.env.npm_package_config_RJS_UGLY:');
    console.log(process.env.npm_package_config_RJS_UGLY);
    console.log('process.env[RJS_UGLY]:');
    console.log(process.env['RJS_UGLY']);
    if (process.env.npm_package_config_RJS_UGLY)
            process.env['RJS_UGLY'] = process.env.npm_package_config_RJS_UGLY;

{'fraction_non_alphanumeric': 0.12867647058823528, 'fraction_numerical': 0.0042569659442724455, 'mean_word_length': 3.219591836734694, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 9, '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': '4878236', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1616, 'n_words': 437}