Last active
December 18, 2015 08:39
-
-
Save camoconnell/5755383 to your computer and use it in GitHub Desktop.
Require js - Uncaught TypeError
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
window.App = {}; | |
// Place third party dependencies in the lib folder | |
// | |
// Configure loading modules from the lib directory, | |
// except 'app' ones, | |
require.config({ | |
urlArgs: "bust=" + (new Date()).getTime(), | |
baseUrl: WP.THEME_URL+"/js", | |
// The shim config allows us to configure dependencies for | |
// scripts that do not call define() to register a module | |
shim: { | |
lodash: { | |
exports: '_' | |
}, | |
backbone: { | |
deps: [ | |
'lodash', | |
'jquery' | |
], | |
exports: 'Backbone' | |
} | |
}, | |
paths: { | |
app : "app" | |
, jquery : "lib/jquery-2.0.2.min" | |
, lodash : "lib/lodash.min" | |
, backbone: "lib/backbone-min" | |
, raphael : "lib/raphael-min" | |
, plugins : "lib/plugins" | |
, utils : "app/utilities/utils" | |
, resize : "app/utilities/resize" | |
, scroll : "app/utilities/scroll" | |
, models : "app/models" | |
, views : "app/views" | |
} | |
}); | |
// Load the main app module to start the app | |
require(["app/main"],function(){}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment