<commit_before>
var
    Eslint = require('eslint'),
    htmlmin = require('html-minifier').minify,
    Chalk = require('chalk'),
    Util = require('util'),
    Uglifyjs = require('uglify-js');


module.exports.init = initFunc;

function initFunc(grunt) {
    var exports = {},
        queryString = Math.floor(Math.random() * 1000);

    exports.log = log;
    exports.lintScript = lintScript;
    exports.minifyHtml = minifyHtml;

    exports.uglify = uglifyScript;
    exports.linkFiles = linkFiles;


    function linkFiles(content, files, startTag, endTag, template) {
        var i,
            scripts = [],
            padding,
            modifiedContent = String(content),
            ind,
            start = content.indexOf(startTag),
            end = content.indexOf(endTag, start);

        // log('info', 'linkFiles', 'content length ', content.length);
        log('info', 'linkFiles', 'no of files ', files.length);
        // log('info', 'linkFiles', 'startTag', startTag);
        // log('info', 'linkFiles', 'endartTag', endTag);
        // log('info', 'linkFiles', 'template', template);
        // log('info', 'linkFiles', 'start', start);
        // log('info', 'linkFiles', 'end', end);

        for (i = 0; i < files.length; i++) {
            scripts.push(Util.format(template, files[i] + '?v=' + queryString));
        }

        // grunt.log.write(scripts);<commit_msg>bug fixed for linking scripts and styles<commit_after>
var
    Eslint = require('eslint'),
    htmlmin = require('html-minifier').minify,
    Chalk = require('chalk'),
    Util = require('util'),
    Uglifyjs = require('uglify-js');


module.exports.init = initFunc;

function initFunc(grunt) {
    var exports = {},
        queryString = Math.floor(Math.random() * 1000);

    exports.log = log;
    exports.lintScript = lintScript;
    exports.minifyHtml = minifyHtml;

    exports.uglify = uglifyScript;
    exports.linkFiles = linkFiles;


    function linkFiles(content, files, startTag, endTag, template) {
        var i,
            scripts = [],
            padding,
            modifiedContent = String(content),
            ind,
            start = modifiedContent.indexOf(startTag),
            end = modifiedContent.indexOf(endTag, start);

        // log('info', 'linkFiles', 'content length ', content.length);
        log('info', 'linkFiles', 'no of files ', files.length);
        // log('info', 'linkFiles', 'startTag', startTag);
        // log('info', 'linkFiles', 'endartTag', endTag);
        // log('info', 'linkFiles', 'template', template);
        // log('info', 'linkFiles', 'start', start);
        // log('info', 'linkFiles', 'end', end);

        for (i = 0; i < files.length; i++) {
            scripts.push(Util.format(template, files[i] + '?v=' + queryString));
        }

        // grunt.log.write(scripts);
{'fraction_non_alphanumeric': 0.16343783022190914, 'fraction_numerical': 0.003522367030644593, 'mean_word_length': 2.519206939281289, 'pattern_counts': {'":': 0, '<': 5, '<?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': '194968', 'n_tokens_mistral': 868, 'n_tokens_neox': 840, 'n_words': 187}