mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
adding documentation for --stdio
This commit is contained in:
parent
9f8710b631
commit
b26e577244
36 changed files with 55 additions and 39 deletions
|
@ -1,7 +1,7 @@
|
||||||
<%
|
<%
|
||||||
require 'uv'
|
require 'uv'
|
||||||
def code_for(file, executable=false)
|
def code_for(file, executable=false)
|
||||||
@stripper ||= /(\A\(function\(\)\{\n|\}\)\(\);\Z|^ )/
|
@stripper ||= /(\A\(function\(\)\{\n|\}\)\(\);\n*\Z|^ )/
|
||||||
return '' unless File.exists?("documentation/js/#{file}.js")
|
return '' unless File.exists?("documentation/js/#{file}.js")
|
||||||
cs = File.read("documentation/coffee/#{file}.coffee")
|
cs = File.read("documentation/coffee/#{file}.coffee")
|
||||||
js = File.read("documentation/js/#{file}.js").gsub(@stripper, '')
|
js = File.read("documentation/js/#{file}.js").gsub(@stripper, '')
|
||||||
|
@ -214,6 +214,14 @@ sudo bin/cake install</pre>
|
||||||
conjunction with <tt>--watch</tt>)
|
conjunction with <tt>--watch</tt>)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>-s, --stdio</code></td>
|
||||||
|
<td>
|
||||||
|
Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT.
|
||||||
|
Good for use with processes written in other languages. An example:<br />
|
||||||
|
<tt>cat src/cake.coffee | coffee -s</tt>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>-e, --eval</code></td>
|
<td><code>-e, --eval</code></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -311,6 +311,14 @@ sudo bin/cake install</pre>
|
||||||
conjunction with <tt>--watch</tt>)
|
conjunction with <tt>--watch</tt>)
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>-s, --stdio</code></td>
|
||||||
|
<td>
|
||||||
|
Pipe in CoffeeScript to STDIN and get back JavaScript over STDOUT.
|
||||||
|
Good for use with processes written in other languages. An example:<br />
|
||||||
|
<tt>cat src/cake.coffee | coffee -s</tt>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>-e, --eval</code></td>
|
<td><code>-e, --eval</code></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -19,9 +19,9 @@ SWITCHES: [
|
||||||
['-l', '--lint', 'pipe the compiled JavaScript through JSLint']
|
['-l', '--lint', 'pipe the compiled JavaScript through JSLint']
|
||||||
['-s', '--stdio', 'listen for and compile scripts over stdio']
|
['-s', '--stdio', 'listen for and compile scripts over stdio']
|
||||||
['-e', '--eval', 'compile a string from the command line']
|
['-e', '--eval', 'compile a string from the command line']
|
||||||
|
['-n', '--no-wrap', 'compile without the top-level function wrapper']
|
||||||
['-t', '--tokens', 'print the tokens that the lexer produces']
|
['-t', '--tokens', 'print the tokens that the lexer produces']
|
||||||
['-tr','--tree', 'print the parse tree that Jison produces']
|
['-tr','--tree', 'print the parse tree that Jison produces']
|
||||||
['-n', '--no-wrap', 'compile without the top-level function wrapper']
|
|
||||||
['-v', '--version', 'display CoffeeScript version']
|
['-v', '--version', 'display CoffeeScript version']
|
||||||
['-h', '--help', 'display this help message']
|
['-h', '--help', 'display this help message']
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue