【问题标题】:Running Coffeescript snippets directly in Aptana Studio 3直接在 Aptana Studio 3 中运行 Coffeescript 片段
【发布时间】:2012-11-19 23:49:10
【问题描述】:

现在我正在使用 CoffeeScript,我很高兴看到 Aptana 现在原生支持它。但我无法直接在 Aptana 中“运行”脚本以将结果打印到内置控制台。

当我按照 CoffeeScript Bundle 中的描述单击 Ctrl+R 时,我只会在控制台中打印一个 git-help 信息。

举例

script.coffee

console.log "Hello Coffee"

当我通过终端输入运行它时

$coffee script.coffee

我得到了完美的打印结果。 我找不到解决此问题的任何文档或提示。 我错过了什么吗?

【问题讨论】:

    标签: coffeescript aptana


    【解决方案1】:

    有一张公开的票here 和一个简短的讨论here

    如果这是你的问题(如果你得到这个'line 3: pre: command not found' error,请查看控制台),那么我找到的一个临时解决方案是编辑Aptana Rubles/coffeescript.ruble/commands/run.rb(位于Linux 安装中的~/Documents 中)并删除'| pre' 从第 11 行开始。

    之后,重新启动 Aptana 或从 Bundles View 重新加载 Coffeescript 包(右键单击它->重新加载),选择文本(仅在有选定文本时才有效)并按 Ctrl-R + 1。您现在应该会看到一个新的 html 文件,其中包含“Hello Coffee”。

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-04
      • 1970-01-01
      • 1970-01-01
      • 2020-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多