<commit_before>var BEM = require('bem'),
    Q = BEM.require('q'),
    PATH = require('path'),
    compat = require('bemhtml-compat');

exports.techMixin = {

    getSuffixes : function() {
        return ['bemhtml', 'bemhtml.xjst'];
    },

    getBuildSuffixes : function() {
        return ['bemhtml.js'];
    },

    getCreateSuffixes : function() {
        return ['bemhtml'];
    },

    getBuildResultChunk : function(relPath, path, suffix) {
        var content = this.readContent(path, suffix);
        return suffix !== 'bemhtml.xjst' ? content.then(function(source) {
          return compat.transpile(source);
        }) : content;
    },

    getBuildResult : function(prefixes, suffix, outputDir, outputName) {
        var _t = this;
        return this.filterPrefixes(prefixes, this.getCreateSuffixes())
            .then(function(paths) {
                return Q.all(paths.map(function(path) {
                    return _t.getBuildResultChunk(
                            PATH.relative(outputDir, path), path, suffix);
                }));
            })
            .then(_t.getCompiledResult.bind(_t));
    },

    getCompiledResult : function(sources) {
        sources = sources.join('\n');

        var BEMHTML = require('../lib/bemhtml');
        return BEMHTML.translate(sources, {
                devMode : process.env.BEMHTML_ENV == 'development',
                cache   : process.env.BEMHTML_CACHE == 'on',
                exportName : 'BEMHTML'
            });
    }

};
<commit_msg>BEMHTML: Add debug files paths to build result<commit_after>var BEM = require('bem'),
    Q = BEM.require('q'),
    PATH = require('path'),
    compat = require('bemhtml-compat');

exports.techMixin = {

    getSuffixes : function() {
        return ['bemhtml', 'bemhtml.xjst'];
    },

    getBuildSuffixes : function() {
        return ['bemhtml.js'];
    },

    getCreateSuffixes : function() {
        return ['bemhtml'];
    },

    getBuildResultChunk : function(relPath, path, suffix) {
        var content = this.readContent(path, suffix);
        return (suffix !== 'bemhtml.xjst' ?
            content.then(function(source) { return compat.transpile(source) }) :
            content)
                .then(function(source) {
                    return '\n/* begin: ' + relPath + ' */\n' +
                        source +
                        '\n/* end: ' + relPath + ' */\n';
                })
    },

    getBuildResult : function(prefixes, suffix, outputDir, outputName) {
        var _t = this;
        return this.filterPrefixes(prefixes, this.getCreateSuffixes())
            .then(function(paths) {
                return Q.all(paths.map(function(path) {
                    return _t.getBuildResultChunk(
                            PATH.relative(outputDir, path), path, suffix);
                }));
            })
            .then(_t.getCompiledResult.bind(_t));
    },

    getCompiledResult : function(sources) {
        sources = sources.join('\n');

        var BEMHTML = require('../lib/bemhtml');
        return BEMHTML.translate(sources, {
                devMode : process.env.BEMHTML_ENV == 'development',
                cache   : process.env.BEMHTML_CACHE == 'on',
                exportName : 'BEMHTML'
            });
    }

};

{'fraction_non_alphanumeric': 0.13871951219512196, 'fraction_numerical': 0.0, 'mean_word_length': 1.883128295254833, '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': '3266546', 'n_tokens_mistral': 983, 'n_tokens_neox': 946, 'n_words': 170}