0

我已经从 Github 下载了YouTube-Instant,我正在尝试运行它。

它包括一个不运行的 .coffee 脚本文件。我搜索了如何运行咖啡脚本并找到running-coffeescript-in-browser。我按照教程并包含了运行咖啡脚本的 javascript 文件,但我仍然无法运行该网站。

这是我网站的链接。

4

1 回答 1

1

You have to compile the main.coffee file with the command coffee -c js/main.coffee which will produce the main.js. Or, if you prefer the in-browser way it describes at the link you gave (which is not recommended), you also have to download coffee-script.js and have these two lines:

<script type="text/coffeescript" src="js/main.coffee"></script>
<script src="js/libs/coffee-script.js"></script>

But then again, only the search box will be on the page(which works but it's invisible, you have to hover to see the cursor), as it states that it is 'unfinished coffee-script port' in the github repo link.

于 2013-02-16T14:53:57.383 回答