Skip to content

Instantly share code, notes, and snippets.

@azu
Created November 23, 2012 13:43
Show Gist options
  • Save azu/4135691 to your computer and use it in GitHub Desktop.
Save azu/4135691 to your computer and use it in GitHub Desktop.
require.js support sourcemap
requirejs.config({
// source map
generateSourceMaps : true,
preserveLicenseComments : false,
optimize : "uglify2",
baseUrl: 'js',
paths: {
zepto: "lib/zepto",
underscore: "lib/lodash",
backbone: "lib/backbone"
},
shim: {
backbone: {
deps: ["underscore", "zepto"],
exports: "Backbone"
},
zepto: {
exports: "Zepto"
}
}
});
define(['zepto', 'app'], function($, App) {
$(function() {
new App();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment