adding the ability to write out compiled coffeescript to the command line

This commit is contained in:
Jeremy Ashkenas
2010-02-12 22:59:21 -05:00
parent 1552470413
commit e02bedcf82
4 changed files with 38 additions and 21 deletions

View File

@@ -558,8 +558,7 @@
// puts parser.generate()
posix = require('posix');
parser_path = 'lib/coffee_script/parser.js';
posix.unlink(parser_path);
posix.open(parser_path, process.O_CREAT | process.O_WRONLY, 0755).addCallback(function(fd) {
posix.open(parser_path, process.O_CREAT | process.O_WRONLY | process.O_TRUNC, 0755).addCallback(function(fd) {
return posix.write(fd, js);
});
})();