Skip to content

Instantly share code, notes, and snippets.

@TravelingTechGuy
Last active December 17, 2015 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TravelingTechGuy/5606296 to your computer and use it in GitHub Desktop.
Save TravelingTechGuy/5606296 to your computer and use it in GitHub Desktop.
Use RequireJS to load Bootstrap and jQuery
'use strict';
requirejs.config({
shim: {
'bootstrap': {
deps: ['jquery']
}
},
paths: {
'jquery': [
'//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min',
//If the CDN location fails, load from this location
'plugins/jquery-2.0.0.min'
],
'bootstrap': 'plugins/bootstrap.min'
}
});
require(['jquery', 'my_module', 'bootstrap'], function($, my_module) {
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment