<commit_before>'use strict';

var Container = require('./src/Chromabits/Container/Container'),
    Wrap = require('./src/Chromabits/Container/Wrap'),
    ClassMap = require('./src/Chromabits/Mapper/ClassMap.js'),
    EnclosureClassMap = require('./src/Chromabits/Mapper/EnclosureClassMap.js'),
    DirectoryMapper = require('./src/Chromabits/Mapper/DirectoryMapper.js');

module.exports = {
    // Keep backwards compatibility
    Container: Container,
    Wrap: Wrap,

    bootstrap: function () {
        return this.bootstrapTo(global);
    },

    bootstrapTo: function (target) {
        target.use = EnclosureClassMap.get.bind(EnclosureClassMap);

        return this;
    },

    // Use a more namespace-ish object for everything else
    Chromabits: {
        Container: {
            Application: require('./src/Chromabits/Container/Application.js'),
            Container: Container,
            ServiceProvider:
                require('./src/Chromabits/Container/ServiceProvider.js'),
            Wrap: Wrap
        },
        Loader: {
            Exceptions: {
                ClassNotFoundException: require(
                    './src/Chromabits/Loader' +
                    '/Exceptions/ClassNotFoundException.js'
                )
            },
            ClassPath: require('./src/Chromabits/Loader/ClassPath.js'),
            Loader: require('./src/Chromabits/Loader/Loader.js')
        },
        Mapper: {
            AbstractMapper:
                require('./src/Chromabits/Mapper/AbstractMapper.js'),
            ClassMap: require('./src/Chromabits/Mapper/ClassMap.js'),
            DirectoryMapper:
                require('./src/Chromabits/Mapper/DirectoryMapper.js'),
            EnclosureClassMap:
                require('./src/Chromabits/Mapper/EnclosureClassMap.js')
        }
    }<commit_msg>Use a loader instead for better class name parsing<commit_after>'use strict';

var Container = require('./src/Chromabits/Container/Container'),
    Wrap = require('./src/Chromabits/Container/Wrap'),
    ClassMap = require('./src/Chromabits/Mapper/ClassMap.js'),
    Loader = require('./src/Chromabits/Loader/Loader.js'),
    EnclosureClassMap = require('./src/Chromabits/Mapper/EnclosureClassMap.js'),
    DirectoryMapper = require('./src/Chromabits/Mapper/DirectoryMapper.js');

module.exports = {
    // Keep backwards compatibility
    Container: Container,
    Wrap: Wrap,

    bootstrap: function () {
        return this.bootstrapTo(global);
    },

    bootstrapTo: function (target) {
        var loader = new Loader();

        loader.addMap(EnclosureClassMap);
        target.use = loader.get.bind(loader);

        return this;
    },

    // Use a more namespace-ish object for everything else
    Chromabits: {
        Container: {
            Application: require('./src/Chromabits/Container/Application.js'),
            Container: Container,
            ServiceProvider:
                require('./src/Chromabits/Container/ServiceProvider.js'),
            Wrap: Wrap
        },
        Loader: {
            Exceptions: {
                ClassNotFoundException: require(
                    './src/Chromabits/Loader' +
                    '/Exceptions/ClassNotFoundException.js'
                )
            },
            ClassPath: require('./src/Chromabits/Loader/ClassPath.js'),
            Loader: Loader
        },
        Mapper: {
            AbstractMapper:
                require('./src/Chromabits/Mapper/AbstractMapper.js'),
            ClassMap: require('./src/Chromabits/Mapper/ClassMap.js'),
            DirectoryMapper:
                require('./src/Chromabits/Mapper/DirectoryMapper.js'),
            EnclosureClassMap:
                require('./src/Chromabits/Mapper/EnclosureClassMap.js')
        }
    }
{'fraction_non_alphanumeric': 0.12460233297985154, 'fraction_numerical': 0.0, 'mean_word_length': 2.032958199356913, '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': '1228813', 'n_tokens_mistral': 1033, 'n_tokens_neox': 986, 'n_words': 153}