将CoffeeScript项目转换为JavaScript(不缩小)? [英] Convert a CoffeeScript project to JavaScript (without minification)?

查看:324
本文介绍了将CoffeeScript项目转换为JavaScript(不缩小)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用CoffeeScript @ work中编写的特定jQuery 插件,我迫切希望我可以将该项目转换为看起来很正常的JS。库看起来像它的结构非常好(好的OOP做法...我想),但我真的很喜欢它,如果我可以探索它的源代码,而不必学习CoffeeScript的所有技巧。

We're using a particular jQuery plugin written in CoffeeScript @ work and I'm desperately hoping I can convert the project into somewhat normal looking JS. The library looks like it's structured really well (good OOP practices... I think), but I'd really like it if I could explore it's source code without having to learn all the tricks that CoffeeScript entails.

推荐答案

将CoffeeScript编译为JavaScript通常会导致JS非常可读。您可以在 CoffeeScript首页的Try CoffeeScript标签上即时转换片段,也可以通过 CoffeeScript命令行工具

Compiling CoffeeScript into JavaScript usually results in JS that is fairly readable. You can convert snippets on the fly on the "Try CoffeeScript" tab of the CoffeeScript homepage, or via the CoffeeScript command line tool.

还有一些工具,如去咖啡因,将CoffeeScript源代码转换为现代JavaScript。

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

如果你知道JavaScript并且只想读取文件的源代码,仔细阅读CoffeeScript主页可能会让你对CoffeeScript有足够的了解,可以很容易地读取CoffeeScript源代码。

If you know JavaScript and just want to be able to read the source of a file, a perusal of the CoffeeScript homepage will probably give you enough understanding of CoffeeScript to read CoffeeScript sources fairly easily.

这篇关于将CoffeeScript项目转换为JavaScript(不缩小)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆