public
Last active

Require js - Uncaught TypeError

  • Download Gist
app.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
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(){});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.