Last active
December 11, 2015 12:08
-
-
Save optilude/4598562 to your computer and use it in GitHub Desktop.
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
// Set the require.js configuration for your application. | |
require.config({ | |
// Load common paths and shims and then load the main.js bootstrap script | |
deps: [ | |
'require.config', | |
'app/main' | |
] | |
}); |
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
<html> | |
<body> | |
<!-- snip --> | |
<!-- bootstrap.js seems superfluous - I'd like to not need it and just depend on app/main here maybe? --> | |
<script data-main="bootstrap" src="vendor/libs/require.js"></script> | |
</body> | |
</html> |
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
// Shared require.js config for paths and shims | |
require.config({ | |
deps: [ | |
'vendor/jam/require.config' | |
], | |
paths: { | |
'backbone.babysitter' : 'vendor/libs/backbone.babysitter', | |
'jquery.tools' : 'vendor/libs/jquery.tools', | |
'jquery.h5validate' : 'vendor/libs/jquery.h5validate', | |
'tpl' : 'vendor/libs/require-tpl', | |
'foundation.modernizr' : 'vendor/foundation/javascripts/modernizr.foundation', | |
'foundation.accordion' : 'vendor/foundation/javascripts/jquery.foundation.accordion', | |
'foundation.alerts' : 'vendor/foundation/javascripts/jquery.foundation.alerts', | |
'foundation.buttons' : 'vendor/foundation/javascripts/jquery.foundation.buttons', | |
'foundation.clearing' : 'vendor/foundation/javascripts/jquery.foundation.clearing', | |
'foundation.forms' : 'vendor/foundation/javascripts/jquery.foundation.forms', | |
'foundation.joyride' : 'vendor/foundation/javascripts/jquery.foundation.joyride', | |
'foundation.magellan' : 'vendor/foundation/javascripts/jquery.foundation.magellan', | |
'foundation.mediaQuery' : 'vendor/foundation/javascripts/jquery.foundation.mediaQueryToggle', | |
'foundation.navigation' : 'vendor/foundation/javascripts/jquery.foundation.navigation', | |
'foundation.orbit' : 'vendor/foundation/javascripts/jquery.foundation.orbit', | |
'foundation.reveal' : 'vendor/foundation/javascripts/jquery.foundation.reveal', | |
'foundation.tabs' : 'vendor/foundation/javascripts/jquery.foundation.tabs', | |
'foundation.tooltips' : 'vendor/foundation/javascripts/jquery.foundation.tooltips', | |
'foundation.topbar' : 'vendor/foundation/javascripts/jquery.foundation.topbar' | |
}, | |
shim: { | |
'foundation.accordion': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.alerts': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.buttons': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.clearing': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.forms': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.joyride': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.magellan': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.mediaQuery': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.navigation': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.orbit': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.reveal': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.tabs': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.tooltips': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'foundation.topbar': { | |
deps: ['jquery', 'foundation.modernizr'] | |
}, | |
'jquery.tools': { | |
deps: ['jquery'] | |
}, | |
'jquery.h5validate': { | |
deps: ['jquery'] | |
} | |
} | |
}); |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title>Backbone Boilerplate Jasmine Test Suite</title> | |
<!-- Jasmine styles --> | |
<link rel="stylesheet" href="/vendor/jam/jasmine/jasmine.css"> | |
</head> | |
<body> | |
<!-- Testing libs --> | |
<!-- script src="/vendor/jam/jasmine/jasmine.js"></script> | |
<script src="/vendor/jam/jasmine/jasmine-html.js"></script --> | |
<!-- Load application --> | |
<script src="/vendor/libs/require.js"></script> | |
<!-- Declare your spec files to be run here --> | |
<script type="text/javascript"> | |
require.config({ | |
// Not sure I like needing this | |
baseUrl: "/", | |
paths: { | |
spec: 'test/jasmine/spec' | |
} | |
}); | |
// I don't understand why I need to list out both require.config and vendor/jam/require.config here | |
// | |
// I tried to add deps: ['vendor/jam/require.config'] to the top-level /require.config.js, but | |
// the transitive dependency doesn't seem to get loaded (or perhaps it's a relative paths problem) | |
require([ | |
'require.config', | |
'vendor/jam/jasmine/jasmine', | |
'vendor/jam/jasmine/jasmine-html', | |
"spec/user" | |
], function() { | |
// Set up the jasmine reporters once each spec has been loaded | |
jasmine.getEnv().addReporter(new jasmine.HtmlReporter()); | |
jasmine.getEnv().execute(); | |
}); | |
</script> | |
</body> | |
</html> |
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
var jam = { | |
"packages": [ | |
{ | |
"name": "backbone", | |
"location": "vendor/jam/backbone", | |
"main": "backbone.js" | |
}, | |
{ | |
"name": "backbone-localStorage", | |
"location": "vendor/jam/backbone-localStorage", | |
"main": "main.js" | |
}, | |
{ | |
"name": "Backbone.Marionette", | |
"location": "vendor/jam/Backbone.Marionette", | |
"main": "lib/amd/backbone.marionette.js" | |
}, | |
{ | |
"name": "chosen", | |
"location": "vendor/jam/chosen" | |
}, | |
{ | |
"name": "jasmine", | |
"location": "vendor/jam/jasmine" | |
}, | |
{ | |
"name": "jquery", | |
"location": "vendor/jam/jquery", | |
"main": "dist/jquery.js" | |
}, | |
{ | |
"name": "lodash", | |
"location": "vendor/jam/lodash", | |
"main": "./lodash.js" | |
}, | |
{ | |
"name": "text", | |
"location": "vendor/jam/text", | |
"main": "text.js" | |
}, | |
{ | |
"name": "underscore", | |
"location": "vendor/jam/underscore", | |
"main": "underscore.js" | |
} | |
], | |
"version": "0.2.13", | |
"shim": { | |
"backbone": { | |
"deps": [ | |
"jquery", | |
"underscore" | |
], | |
"exports": "Backbone" | |
}, | |
"underscore": { | |
"exports": "_" | |
} | |
} | |
}; | |
if (typeof require !== "undefined" && require.config) { | |
require.config({ | |
"packages": [ | |
{ | |
"name": "backbone", | |
"location": "vendor/jam/backbone", | |
"main": "backbone.js" | |
}, | |
{ | |
"name": "backbone-localStorage", | |
"location": "vendor/jam/backbone-localStorage", | |
"main": "main.js" | |
}, | |
{ | |
"name": "Backbone.Marionette", | |
"location": "vendor/jam/Backbone.Marionette", | |
"main": "lib/amd/backbone.marionette.js" | |
}, | |
{ | |
"name": "chosen", | |
"location": "vendor/jam/chosen" | |
}, | |
{ | |
"name": "jasmine", | |
"location": "vendor/jam/jasmine" | |
}, | |
{ | |
"name": "jquery", | |
"location": "vendor/jam/jquery", | |
"main": "dist/jquery.js" | |
}, | |
{ | |
"name": "lodash", | |
"location": "vendor/jam/lodash", | |
"main": "./lodash.js" | |
}, | |
{ | |
"name": "text", | |
"location": "vendor/jam/text", | |
"main": "text.js" | |
}, | |
{ | |
"name": "underscore", | |
"location": "vendor/jam/underscore", | |
"main": "underscore.js" | |
} | |
], | |
"shim": { | |
"backbone": { | |
"deps": [ | |
"jquery", | |
"underscore" | |
], | |
"exports": "Backbone" | |
}, | |
"underscore": { | |
"exports": "_" | |
} | |
} | |
}); | |
} | |
else { | |
var require = { | |
"packages": [ | |
{ | |
"name": "backbone", | |
"location": "vendor/jam/backbone", | |
"main": "backbone.js" | |
}, | |
{ | |
"name": "backbone-localStorage", | |
"location": "vendor/jam/backbone-localStorage", | |
"main": "main.js" | |
}, | |
{ | |
"name": "Backbone.Marionette", | |
"location": "vendor/jam/Backbone.Marionette", | |
"main": "lib/amd/backbone.marionette.js" | |
}, | |
{ | |
"name": "chosen", | |
"location": "vendor/jam/chosen" | |
}, | |
{ | |
"name": "jasmine", | |
"location": "vendor/jam/jasmine" | |
}, | |
{ | |
"name": "jquery", | |
"location": "vendor/jam/jquery", | |
"main": "dist/jquery.js" | |
}, | |
{ | |
"name": "lodash", | |
"location": "vendor/jam/lodash", | |
"main": "./lodash.js" | |
}, | |
{ | |
"name": "text", | |
"location": "vendor/jam/text", | |
"main": "text.js" | |
}, | |
{ | |
"name": "underscore", | |
"location": "vendor/jam/underscore", | |
"main": "underscore.js" | |
} | |
], | |
"shim": { | |
"backbone": { | |
"deps": [ | |
"jquery", | |
"underscore" | |
], | |
"exports": "Backbone" | |
}, | |
"underscore": { | |
"exports": "_" | |
} | |
} | |
}; | |
} | |
if (typeof exports !== "undefined" && typeof module !== "undefined") { | |
module.exports = jam; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment