Created
July 31, 2013 21:24
-
-
Save mpriour/6126325 to your computer and use it in GitHub Desktop.
possible requirejs config to get dojo & esri to play nice with require.js (in browser ONLY)
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 require */ | |
require.config({ | |
baseUrl: 'bower_components', | |
shim: { | |
underscore: { | |
exports: '_' | |
}, | |
backbone: { | |
deps: [ | |
'underscore', | |
'jquery' | |
], | |
exports: 'Backbone' | |
}, | |
bootstrap: { | |
deps: ['jquery'], | |
exports: 'jquery' | |
} | |
}, | |
paths: { | |
jquery: 'jquery/jquery', | |
underscore: 'underscore-amd/underscore', | |
backbone: 'backbone-amd/backbone', | |
bootstrap: '../scripts/vendor/bootstrap', | |
rjstext: 'text/text', | |
i18n: 'requirejs-i18n/i18n', | |
/* THESE are implied given the baseUrl | |
dojo: 'dojo', | |
dijit: 'dijit', | |
dojox: 'dojox', | |
dgrid: 'dgrid', | |
xstyle: 'xstyle', | |
'put-selector': 'put-selector', | |
*/ | |
//esri: '//js.arcgis.com/3.6amd/js/esri', | |
esri: '/Users/matt/projects/ArcGIS/RIA/JavaScript/ArcGIS2/devOutput/jsapi/src/js/esri', | |
app: '../scripts/myApp' | |
}, | |
map: { | |
'*': { | |
'text': 'rjstext' | |
} | |
} | |
}); | |
require(['app/Controller', 'backbone', 'bootstrap'], function(Controller, Backbone) { | |
'use strict'; | |
Controller.startup(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment