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

@@ -456,6 +456,5 @@ js: parser.generate()
# 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 (fd) ->
posix.open(parser_path, process.O_CREAT | process.O_WRONLY | process.O_TRUNC, 0755).addCallback (fd) ->
posix.write(fd, js)