Skip to content

Instantly share code, notes, and snippets.

@Nomon
Created January 13, 2011 16: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 Nomon/778166 to your computer and use it in GitHub Desktop.
Save Nomon/778166 to your computer and use it in GitHub Desktop.
require.extensions['.js'] = function(module,filename) {
var content;
content = require('fs').readFileSync(filename, 'utf8');
return module._compile(content.replace(/^ *\/\/debug: */gm, ''), filename);
}
//debug: console.log('This will be printed in debug mode only');
var options = {debug: true}
if(options.debug) require('./debug.js');
require('./file.js');
while(1) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment