Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add support for Cakefiles! #101

Merged
merged 1 commit into from May 29, 2012
Jump to file or symbol
Failed to load files and symbols.
+8 −1
Split
View
@@ -0,0 +1,6 @@
+return if not require('streamline/module')(module)
+
+task 'greet', (options, _) ->
+ console.log 'Hello...'
+ setTimeout _, 1000
+ console.log '...world!'
View
@@ -62,7 +62,8 @@ exports.trackModule = function(m, options) {
m.filename = m.filename.replace(/\\/g, '/');
var tmp = m.filename.substring(0, m.filename.lastIndexOf('/'));
- tmp += '/tmp--' + Math.round(Math.random() * 1e9) + path.extname(m.filename);
+ var ext = (path.basename(m.filename) === 'Cakefile') ? '.coffee' : path.extname(m.filename);
+ tmp += '/tmp--' + Math.round(Math.random() * 1e9) + ext;
//console.error("WARNING: streamline not registered, re-loading module " + m.filename + " as " + tmp);
exports.register({});
fs.writeFileSync(tmp, fs.readFileSync(m.filename, "utf8"), "utf8");