Skip to content

Instantly share code, notes, and snippets.

@jacobtoye
Created February 22, 2012 22:00
Show Gist options
  • Save jacobtoye/1887714 to your computer and use it in GitHub Desktop.
Save jacobtoye/1887714 to your computer and use it in GitHub Desktop.
({
baseUrl: "../js",
mainConfigFile: "../js/main.js",
optimize: "none",
name: "main",
//excludeShallow: ["jquery", "handlebars", "leaflet", "wax"],
out: "../js/main-built.js",
paths: {
jquery: 'empty:',
underscore: 'libs/underscore/underscore-min',
backbone: 'libs/backbone/backbone-min',
handlebars: 'empty:',
text: 'libs/require/text',
use: 'libs/require/use',
leaflet: 'empty:',
wax: 'empty:'
},
use: {
handlebars: {
attach: 'Handlebars'
},
leaflet: {
attach: 'L'
},
wax: {
deps: ['leaflet'],
attach: 'wax'
}
}
})
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/leaflet/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="assets/libs/leaflet/leaflet.ie.css" /><![endif]-->
<link rel="stylesheet" type="text/css" href="css/bootstrap/css/bootstrap.min.css" />
<script src="js/libs/modernizr/modernizr-2.0.6.min.js"></script>
<script data-main="js/main-built.js" src="js/libs/require/require.js"></script>
</head>
<body>
<div id="main" role="main"></div>
</body>
</html>
require.config({
deps: ['main'],
paths: {
jquery: 'libs/jquery/jquery-1.7.1.min',
underscore: 'libs/underscore/underscore-min',
backbone: 'libs/backbone/backbone-min',
handlebars: 'libs/handlebars/handlebars-1.0.0.beta.6',
text: 'libs/require/text',
use: 'libs/require/use',
leaflet: 'libs/leaflet/leaflet',
wax: 'libs/wax/wax.leaf'
},
use: {
handlebars: {
attach: 'Handlebars'
},
leaflet: {
attach: 'L'
},
wax: {
deps: ['leaflet'],
attach: 'wax'
}
}
});
require(['jquery', 'router'], function(jQuery, Router){
jQuery(function ($) {
var router = new Router();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment