Mercurial > wikked
diff static/js/wikked.js @ 60:8250c977bc50
Moved static files to the root directory.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 05 Feb 2013 14:49:34 -0800 |
parents | wikked/static/js/wikked.js@9658edea3121 |
children | 130eccd396d8 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/static/js/wikked.js Tue Feb 05 14:49:34 2013 -0800 @@ -0,0 +1,56 @@ +/** + * RequireJS configuration. + * + * We need to alias/shim some of the libraries. + */ +require.config({ + urlArgs: "bust=" + (new Date()).getTime(), + paths: { + jquery: 'jquery-1.8.3.min', + underscore: 'underscore-min', + backbone: 'backbone-min', + handlebars: 'handlebars-1.0.rc.1', + bootstrap: '/bootstrap/js/bootstrap.min' + }, + shim: { + 'jquery': { + exports: '$' + }, + 'underscore': { + exports: '_' + }, + 'backbone': { + deps: ['underscore', 'jquery'], + exports: 'Backbone' + }, + 'handlebars': { + exports: 'Handlebars' + }, + 'bootstrap': { + deps: ['jquery'] + } + } +}); + +//-------------------------------------------------------------// + +/** + * Entry point: run Backbone! + * + * We also import scripts like `handlebars` that are not used directly + * by anybody, but need to be evaluated. + */ +require([ + 'wikked/app', + 'wikked/handlebars', + 'backbone', + 'bootstrap', + 'text' + ], + function(app, hb, Backbone, textExtension) { + + var router = new app.Router(); + Backbone.history.start();//{ pushState: true }); + +}); +