<commit_before>/*jslint node:true*/

module.exports = {

    /**
     * Specify a list of modules to use as seed.
     *
     * E.g. seed(['yui-base', 'loader-base'];
     *
     * @param {Array} modules list of modules to use
     */
    seed: function (modules) {

        var config = this.config({
            seed: modules
        });

        return false;

    },

    /**
     * Expand the list of seed modules and expose the seeds to the client.
     */
    exposeSeed: function () {

        // getting static config
        var config = this.config(),
            seedCache = '',
            modules = [].concat(config.seed || ['yui-base']),
            appModules = [].concat((config.groups && config.groups.app && config.groups.app.modules) || []),
            mod,
            i,
            Y,
            loader;

        Y = this.YUI({sync: true}).use(['loader-base'].concat(appModules));

        // TODO: add config so that module expansion can be disabled if needed
        // expand modules
        loader = new Y.Loader({
            base: config.base,
            ignoreRegistered: true,
            require : modules
        });
        loader.calculate();
        modules = [].concat(loader.sorted);
        loader = null;
        Y = null;

        // producing blob with the html fragment
        for (i = 0; i < modules.length; i += 1) {<commit_msg>Fix passing app module definition to YUI;<commit_after>/*jslint node:true*/

var utils = require('./utils');

module.exports = {

    /**
     * Specify a list of modules to use as seed.
     *
     * E.g. seed(['yui-base', 'loader-base'];
     *
     * @param {Array} modules list of modules to use
     */
    seed: function (modules) {

        var config = this.config({
            seed: modules
        });

        return false;

    },

    /**
     * Expand the list of seed modules and expose the seeds to the client.
     */
    exposeSeed: function () {

        // getting static config
        var config = this.config(),
            seedCache = '',
            modules = [].concat(config.seed || ['yui-base']),
            appModules = utils.clone(((config.groups && config.groups.app && config.groups.app.modules) || {})),
            mod,
            i,
            Y,
            loader;

        Y = this.YUI({sync: true, modules: appModules}).use('loader-base');

        // TODO: add config so that module expansion can be disabled if needed
        // expand modules
        loader = new Y.Loader({
            base: config.base,
            ignoreRegistered: true,
            require : modules
        });
        loader.calculate();
        modules = [].concat(loader.sorted);
        loader = null;
        Y = null;

        // producing blob with the html fragment
        for (i = 0; i < modules.length; i += 1) {
{'fraction_non_alphanumeric': 0.1312522170982618, 'fraction_numerical': 0.001418942887548776, 'mean_word_length': 1.637979420018709, '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': '2517345', 'n_tokens_mistral': 786, 'n_tokens_neox': 771, 'n_words': 235}