<commit_before>requirejs.config( {

    baseUrl: '../../bower_components',

    paths: {
        'jquery': '../node_modules/jquery/dist/jquery',
        'underscore': 'underscore/underscore',
        'backbone': 'backbone/backbone',
        'marionette': 'marionette/lib/backbone.marionette',
        'backbone.marionette.export': '/dist/amd/backbone.marionette.export'
    },

    shim: {
        'backbone': {
            deps: ['underscore', 'jquery'],
            exports: 'Backbone'
        },
        'underscore': {
            exports: '_'
        },
        'marionette' : {
            deps : ['jquery', 'underscore', 'backbone'],
            exports : 'Marionette'
        }
    }
} );

require( [

    'jquery',
    'underscore',
    'backbone',
    'marionette',
    'backbone.marionette.export'

], function ( $, _, Backbone ) {

    var Model = Backbone.Model.extend( {
            exportable: "someMethod",

            onExport: function ( data ) {
                data || (data = {});
                data.someMethodWithArgs = this.someMethodWithArgs( this.cid );
                return data;
            },
            someMethod: function () {
                return "This is the return value of a method call on model <code>" + this.id + "</code>.";
            },
            someMethodWithArgs: function ( arg ) {
                return "This is the return value of a method call with argument <code>" + arg + "</code> on model <code>" + this.id + "</code>.";
            }
        } ),

        Collection = Backbone.Collection.extend( {
            exportable: [ "first", "last" ]
        } ),

        m1 = new Model( { id: 1  } ),
        m2 = new Model( { id: 2  } ),
        m3 = new Model( { id: 3  } ),

        collection = new Collection( [ m1, m2, m3 ] ),

        DataView = Backbone.Marionette.CompositeView.extend( {
            itemView: Backbone.Marionette.ItemView.extend( {
                tagName: "li",
                template: "#model-template"
            } ),
            itemViewContainer: "ul",
            template: "#collection-template"
        } ),

        dataRegion = new Backbone.Marionette.Region( {
            el: "#main"
        } );

    dataRegion.show( new DataView( { collection: collection } ) );
} );<commit_msg>Fixed demo for Marionette 2.0<commit_after>requirejs.config( {

    baseUrl: '../../bower_components',

    paths: {
        'jquery': '../node_modules/jquery/dist/jquery',
        'underscore': 'underscore/underscore',
        'backbone': 'backbone/backbone',
        'marionette': 'marionette/lib/backbone.marionette',
        'backbone.marionette.export': '/dist/amd/backbone.marionette.export'
    },

    shim: {
        'backbone': {
            deps: ['underscore', 'jquery'],
            exports: 'Backbone'
        },
        'underscore': {
            exports: '_'
        },
        'marionette' : {
            deps : ['jquery', 'underscore', 'backbone'],
            exports : 'Marionette'
        }
    }
} );

require( [

    'jquery',
    'underscore',
    'backbone',
    'marionette',
    'backbone.marionette.export'

], function ( $, _, Backbone ) {

    var Model = Backbone.Model.extend( {
            exportable: "someMethod",

            onExport: function ( data ) {
                data || (data = {});
                data.someMethodWithArgs = this.someMethodWithArgs( this.cid );
                return data;
            },
            someMethod: function () {
                return "This is the return value of a method call on model <code>" + this.id + "</code>.";
            },
            someMethodWithArgs: function ( arg ) {
                return "This is the return value of a method call with argument <code>" + arg + "</code> on model <code>" + this.id + "</code>.";
            }
        } ),

        Collection = Backbone.Collection.extend( {
            exportable: [ "first", "last" ]
        } ),

        m1 = new Model( { id: 1  } ),
        m2 = new Model( { id: 2  } ),
        m3 = new Model( { id: 3  } ),

        collection = new Collection( [ m1, m2, m3 ] ),

        DataView = Backbone.Marionette.CompositeView.extend( {
            childView: Backbone.Marionette.ItemView.extend( {
                tagName: "li",
                template: "#model-template"
            } ),
            childViewContainer: "ul",
            template: "#collection-template"
        } ),

        dataRegion = new Backbone.Marionette.Region( {
            el: "#main"
        } );

    dataRegion.show( new DataView( { collection: collection } ) );
} );
{'fraction_non_alphanumeric': 0.1457604895104895, 'fraction_numerical': 0.004370629370629371, 'mean_word_length': 1.682883939038687, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '7516652', 'n_tokens_mistral': 1374, 'n_tokens_neox': 1317, 'n_words': 286}