Created
June 30, 2013 01:34
-
-
Save jiggliemon/5893412 to your computer and use it in GitHub Desktop.
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
var block = require('yayo/block') | |
var fs = require('fs') | |
function getTemplate(name) { | |
return fs.readFileSync('./tmpl/'+name+'.tmpl', 'utf8') | |
} | |
var layout = new block({ | |
template: getTemplate('layout') | |
}) | |
var header = new block({ | |
template: getTemplate('header'), | |
id: "header" | |
}) | |
var footer = new block({ | |
template: getTemplate('footer'), | |
id:"footer" | |
}) | |
layout.setBlock(header) | |
layout.setBlock(footer) | |
console.log(String(layout)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment