Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Created February 4, 2010 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim-smart/295228 to your computer and use it in GitHub Desktop.
Save tim-smart/295228 to your computer and use it in GitHub Desktop.
var vars = {};
exports.hot = function(path) {
vars = require(path);
process.watchFile(path + ".js", function() {
process.mixin(vars, require.unCache(path));
});
return vars;
}
var module = require('./hot').hot('./module');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment