Skip to content

Instantly share code, notes, and snippets.

@EyePulp
Created March 1, 2013 17:44
Show Gist options
  • Save EyePulp/5066380 to your computer and use it in GitHub Desktop.
Save EyePulp/5066380 to your computer and use it in GitHub Desktop.
define(['ko','ko.mapping','underscore','moment'],
function(ko,mapping,_,moment) {
console.log('dashboard VM loaded:',arguments);
return function(){
var self = this;
};
});
<head>
<script type="text/javascript" data-main="/static/js/require.conf.js" src="/static/js/libs/requirejs-jquery.js"></script>
<script type="text/javascript">
require(['/static/js/ko/dashboard.js']);
</script>
</head>
require.config({
paths: {
'bootstrap' : '/static/js/libs/bootstrap.2.3.0.min'
,'ko' : '/static/js/libs/ko/knockout.2.2.1.min'
,'ko.tl' : '/static/js/libs/ko/ko.requirejs.template.loader'
,'ko.te' : '/static/js/libs/ko/ko.string.template.engine'
,'ko.mapping' : '/static/js/libs/ko/ko.mapping.plugin'
,'text' : '/static/js/libs/requirejs.text.plugin'
,'underscore' : '/static/js/libs/underscore.1.4.3.min'
,'uuid' : '/static/js/libs/jquery.uuid'
,'moment' : '/static/js/libs/moment.min'
}
, waitSeconds: 15
, urlArgs: "boo=" + (new Date()).getTime()
});
require(['jquery'], function($){
console.log('require.js conf loaded');
$(function () { // after the dom settles
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment