Coffeescript 客户端:"unexpected end of input"

Coffeescript cli: "unexpected end of input"

使用 Coffeescript 网站上的示例,我尝试使用 cli 转换一些 javascript 文件,但出现 "unexpected end of input" 错误。他们的示例如下所示:

coffee --compile --output lib/ src/

我已经更改了参数等,并从 CS 文件所在的目录调用它。这一定是某种 "operator error" 但我没有看到它,而且我尝试过的 none 变体有所帮助(使用绝对路径,更改参数顺序等)。 运行 在 OSX。

我可以看到两个问题。

  1. 调回参数顺序,使包含 .coffee 文件的源目录在最后

coffee --compile --output libjs/ lib/

  1. 运行 上面的命令直接在你的终端/控制台。从屏幕截图看来,您首先 运行 coffee 然后输入 --compile --output libjs/ lib/.