如何在Google App Engine上使用Coffeescript

huangapple go评论109阅读模式
英文:

How to use Coffeescript on Google App Engine

问题

有人知道在Google App Engine上是否可以使用Coffeescript吗?如果可以,如何在app engine的Python或Go平台上实现?

英文:

Does anyone know if it is possible to use Coffeescript on Google App Engine? If so how can this be done with the app engine Python or Go platforms?

答案1

得分: 2

Coffeescript编译成Javascript,可以在Web浏览器中运行。在这种情况下,App Engine可以提供生成的javascript。

我不知道有任何方法可以将coffeescript编译成python、java或go,所以你不能将其用作服务器端语言。

英文:

Coffeescript compiles to Javascript, which can be run in a web browser. In that case, App Engine can serve up the resulting javascript.

I don't know of any way to compile coffeescript to python, java or go though, so you can't use it as a server side language.

答案2

得分: 0

可能的。

  1. 脚本标签方法

您可以使用Coffeescript编译器:

http://coffeescript.org/extras/coffee-script.js

将其添加到您的页面头部:

<script type="text/javascript" src="/coffee-script.js" />
<script type="text/coffeescript" src="/your_script.coffee" />

使用此方法进行测试或轻量级应用程序

  1. Django的MediaGenerator

如果您使用Django框架,这可能是最适合您的:

http://www.allbuttonspressed.com/projects/django-mediagenerator#coffeescript

它将编译您的Coffeescript并为您完成工作!

最后几句话:我是开发中的新手。我只能阅读JS,但非常喜欢Coffeescipt。经过很多探索,我最终选择了Ruby on Rails而不是Python在某些框架上。因为资产管道对我来说更少配置且易于学习。顺便说一句,Python仍然是我更喜欢的语言而不是Ruby XD

英文:

It's possible.

  1. Script Tag Method

You may use the Coffeescript compiler:

http://coffeescript.org/extras/coffee-script.js

Add it into your page header:

<script type="text/javascript" src="/coffee-script.js" />
<script type="text/coffeescript" src="/your_script.coffee" />

Use this method for testing or lite-app

  1. MediaGenerator for Django

If you use Django frameworks, this may be the best for you:

http://www.allbuttonspressed.com/projects/django-mediagenerator#coffeescript

It will compile your coffeescript and get things done for you!

final few words: I am newbie in development. I only can read JS but like Coffeescipt a lot. After a lot of exploration. I finally choose Ruby on Rails instead of Python on some frameworks. Because asset pipeline is less-config and easy to learn for me. BTW, Python is still my favour language over Ruby XD

huangapple
  • 本文由 发表于 2012年3月19日 12:03:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/9764895.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定