Last active
December 12, 2015 15:29
-
-
Save taxilian/4790603 to your computer and use it in GitHub Desktop.
require.js shim config for loading twitter bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global requirejs*/ | |
requirejs.config({ | |
shim: { | |
"bootstrap/js/bootstrap-affix": ["jquery"], | |
"bootstrap/js/bootstrap-transition": ["bootstrap/js/bootstrap-affix"], | |
"bootstrap/js/bootstrap-alert": ["bootstrap/js/bootstrap-transition"], | |
"bootstrap/js/bootstrap-button": ["bootstrap/js/bootstrap-alert"], | |
"bootstrap/js/bootstrap-collapse": ["bootstrap/js/bootstrap-button"], | |
"bootstrap/js/bootstrap-dropdown": ["bootstrap/js/bootstrap-collapse"], | |
"bootstrap/js/bootstrap-modal": ["bootstrap/js/bootstrap-dropdown"], | |
"bootstrap/js/bootstrap-tooltip": ["bootstrap/js/bootstrap-modal"], | |
"bootstrap/js/bootstrap-popover": ["bootstrap/js/bootstrap-tooltip"], | |
"bootstrap/js/bootstrap-scrollspy": ["bootstrap/js/bootstrap-popover"], | |
"bootstrap/js/bootstrap-tab": ["bootstrap/js/bootstrap-scrollspy"], | |
"bootstrap/js/bootstrap-typeahead": ["bootstrap/js/bootstrap-tab"] | |
} | |
}); | |
define(["jquery", | |
"./js/bootstrap-affix", | |
"./js/bootstrap-transition", | |
"./js/bootstrap-alert", | |
"./js/bootstrap-button", | |
"./js/bootstrap-collapse", | |
"./js/bootstrap-dropdown", | |
"./js/bootstrap-modal", | |
"./js/bootstrap-tooltip", | |
"./js/bootstrap-popover", | |
"./js/bootstrap-scrollspy", | |
"./js/bootstrap-tab", | |
"./js/bootstrap-typeahead" | |
], function($) { | |
// Nothing needed, this is just to include the others | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Worth noting that the shim paths are the absolute paths