Created
January 13, 2011 16:52
-
-
Save Nomon/778166 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
require.extensions['.js'] = function(module,filename) { | |
var content; | |
content = require('fs').readFileSync(filename, 'utf8'); | |
return module._compile(content.replace(/^ *\/\/debug: */gm, ''), filename); | |
} |
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
//debug: console.log('This will be printed in debug mode only'); |
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 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