Created
September 24, 2013 15:52
-
-
Save Rolilink/6686935 to your computer and use it in GitHub Desktop.
my shim config
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
Folder | |
| Public | |
| | Js | |
| | | app | |
| | | | views | |
| | | | | topbar.js | |
| | | | pages | |
| | | | | main.js | |
| | | libs | |
| | | | backbone.js |
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
require.config({ | |
baseUrl: 'js', | |
paths:{ | |
libs:"libs", | |
templates: "app/templates", | |
collections: "app/collections", | |
models: "app/models", | |
pages: "app/pages", | |
views: "app/views", | |
backbone: "libs/backbone" | |
}, | |
shim:{ | |
handlebars:{ | |
exports: 'Handlebars' | |
}, | |
underscore:{ | |
exports:"_" | |
}, | |
backbone:{ | |
deps:["libs/underscore","libs/jquery"], | |
exports:"Backbone" | |
} | |
} | |
}); | |
require(['libs/jquery','views/topbar'],function($,TopBar){ | |
console.log($); | |
var topbar = new TopBar({el:$("body")}); | |
}); |
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
define([ | |
'libs/jquery', | |
'libs/underscore', | |
'libs/backbone', | |
'libs/handlebars'], | |
function($,_,Backbone,Handlebars){ | |
console.log(Backbone); | |
/*return Backbone.View.extend({ | |
initialize: function(){ | |
}, | |
render: function(){ | |
var data = { | |
"logo":"tuvivi.png", | |
"titulo":"Tuvivi", | |
"subtitulo": "Certificados de regalo online", | |
"facebook-url": "https://www.facebook.com/tuvivicom", | |
"twitter-url": "https://twitter.com/tuvivi", | |
"instagram-url": "http://instagram.com/tuvivicom" | |
}; | |
var template = Handlebars.compile(menuhbs); | |
$(this.el).html(template(data)); | |
} | |
});*/ | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment