init, just some testing

This commit is contained in:
psychobunny
2013-04-22 16:51:32 +00:00
commit b04d262fe4
256 changed files with 36023 additions and 0 deletions

23
src/templates.js Normal file
View File

@@ -0,0 +1,23 @@
var fs = require('fs');
(function(Templates) {
global.templates = {};
function loadTemplates(templatesToLoad) {
for (var t in templatesToLoad) {
(function(template) {
console.log(global.configuration.ROOT_DIRECTORY);
fs.readFile(global.configuration.ROOT_DIRECTORY + '/public/templates/' + template + '.tpl', function(err, html) {
global.templates[template] = html;
console.log(html);
});
}(templatesToLoad[t]));
}
}
Templates.init = function() {
loadTemplates(['header', 'footer', 'register', 'home']);
}
}(exports));