-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
I didn't do a pull request. You have a few waiting anyway.
I suggest something like, to stay in line with the rest of the code and conventions, to modify cli.coffee and append a switch e.g. -i for processing stdin.
['-i', '--stdin', 'accept input over standard input interface stdin']Then add
codeIn = ""
stdin = process.openStdin()
# and under run...
if options.stdin
# Buffer streams of data and concat to string until finished
stdin.on 'data', (buffer) -> codeIn += buffer.toString() if buffer
stdin.on 'end', -> log coffeecup.render codeInThis will allow for something like
$ coffee -p -b myfile.litcoffee | js2coffee | coffeecup -iAs a little round-trip since coffeescript cli tool doesn't really allow a unmangle of the .litcoffee files yet.
Metadata
Metadata
Assignees
Labels
No labels