Last active
December 17, 2015 11:59
-
-
Save TravelingTechGuy/5606296 to your computer and use it in GitHub Desktop.
Use RequireJS to load Bootstrap and jQuery
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
'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