Bootstrap File - mitzerh/modulr-js GitHub Wiki

bootstrap.js

Instantiating a package is pretty straight forward. This is an important file as this is the "key" to accessing the package from other packages.

Here is a basic bootstrap configuration:

var basic = Modulr.config({
    // package instance name
    instance: "basic",
    // domain used for your js assets
    baseDomain: "http://my.domain.com",
    // base path for your package
    baseUrl: "/js/basic/app",
    // shimmed files
    shim: {
        "jquery": {
            src: "//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js",
            exports: "jQuery"
        },
        "jquery.cookie": {
            deps: ["jquery"],
            src: "//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js",
            exports: "jQuery.cookie"
        }
    }
});

A detailed breakdown of configuration properties will be at Configuration.