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
class window.HomeView extends Backbone.View | |
template: _.template($('#home').html()) | |
render: (eventName) -> | |
$(@el).html(@template()) | |
return @ | |
class window.Page1View extends Backbone.View | |
template: _.template($('#page1').html()) | |
render: (eventName) -> | |
$(@el).html(@template()) |
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
/** | |
* @param JSON incoming The JSON with all the strings | |
* @param array templates The temporary holder of the templates | |
* @param parentName string Helper string for storing the name of the route | |
* @return array Array with the parsed routes | |
* @example parse([dirA: ['example', 'example2'], dirB: ['example3', subdir:['s1','s2']]) | |
* returns ['dirA/example','dirA/example2','dirB/example3','dirB/subdir/s1','dirb/subdir/s2'] | |
*/ | |
function parse(incoming, templates, parentName){ | |
var i; |
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
files = [ | |
'a.json', | |
'b.json', | |
'c.json' | |
] | |
last = 'c.json' | |
loadFileDev = (name, holder, callback) -> | |
$.get("locales/dev/#{name}", (data) => | |
holder[name] = data |
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
#!/bin/sh | |
######################################################################################################## | |
### Launches toaster compiler and copies some code to another place every time "client.js" file ### | |
### (this file is auto-generated with toaster) changes. ### | |
### requires inotify tools: sudo apt-get install inotify-tools ### | |
### Font (http://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes) ### | |
######################################################################################################## | |
toaster -wcd & |