English 中文(简体)
• 将“咖啡”项目转至 Java(无污染)? [闭门]
原标题:Convert a CoffeeScript project to JavaScript (without minification)? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers.

我们重新使用在咖啡厅工作时写成的一条特别的舱位plugin,而I m hoping I能够将该项目转化为较为正常的looking本。 图书馆认为,它的结构确实是好的(好OOP做法),但我真的喜欢它,如果我可以探讨它的来源代码,而不必学习咖啡所带来的一切trick。

最佳回答

将咖啡本编成 Java本,通常会在比较可读的书面材料中产生。 您可以转播关于“Try Campbell”的传单,上面有,有的是通过

There are also tools like decaffeinate that convert CoffeeScript source to modern JavaScript.

如果你知道贾瓦语,并且只是想读到档案的来源,那么咖啡版的永久版本很可能使你非常容易地理解咖啡经典。

问题回答

There s also this online compiler http://js2coffee.org/ that can convert coffeescript to and from javascript

http://coffeescript.org/ 有一个表格——咖啡厅

左边的咖啡和左边的SJS pops

4. 基本用途: http://coffeescript.org/#usage” rel=“noretinger” 载于《咖啡经典导线》工具,但我认为,我对邮局的实际指挥是:

  • Compile a directory tree of .coffee files in src into a parallel tree of .js files in lib:

    页: 1

您的最好之事是,一旦编辑,就将文字转换成贾瓦文,根据你风格的指南,你可以走到前面,并安排贾瓦文。

希望会有所帮助。

You could also try Depercolator which wraps up a bunch of commands together (includes decafinate, cjsx-transform, react-codemod, prettier).

The writeup: https://blog.bugsnag.com/converting-a-large-react-codebase-from-coffeescript-to-es6/ and GH repo: https://github.com/bugsnag/depercolator





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签