Skip to content

Instantly share code, notes, and snippets.

@ncb000gt
Created August 6, 2012 02:10
Show Gist options
  • Save ncb000gt/3269142 to your computer and use it in GitHub Desktop.
Save ncb000gt/3269142 to your computer and use it in GitHub Desktop.
Tako template reloads.
var tako = require('tako'),
path = require('path'),
watch = require('watch'),
app = tako(),
templates = app.templates;
var templatePath = path.join(__dirname, 'templates');
templates.directory(templatePath);
watch.watchTree(templatePath, function() {
console.log('reload templates');
templates.directory(templatePath);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment