有没有coffeescript自动编译/文件观察器的Windows? [英] is there a coffeescript auto compile / file watcher for windows?

查看:150
本文介绍了有没有coffeescript自动编译/文件观察器的Windows?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想把coffeescript整合到我的开发过程中。但是我看到它,我必须做一个bat文件,迭代一组咖啡文件和吐出js文件。每次我写一个bat文件,有用的,因为他们可能是,我问自己:有更好的方法吗?



这让我想知道:有一个应用程序的某种形式的Windows,将观看目录或文件,吐出一个/许多js文件,当一个咖啡文件保存?我想要建立一个,但不想重塑的轮子。我环顾四周,发现类似的东西,但没有什么提高它超越运行这个命令行在Windows上。



编辑:已标记了一个答案,但看这10个月后,答案是: grunt 。因为它会做的不仅仅是自动编译coffeescript,你可能需要做的不仅仅是让你的应用程序去。

解决方案

查看帖子底部的更新。



我在另一天寻找同样的事情,遇到了这个问题: https://github.com/ danenania / CoffeePy



这是一个简单的python脚本,使用 PyV8 运行 coffee-script.js



它不做任何花哨,只是递归地观看一个文件夹,并且每当它们被改变时编译任何 .coffee 文件。它甚至没有一个裸选项。这些东西可以很容易添加,虽然!



编辑



脚本并添加 - bare - 输出选项。



您可以在这里取得: https://github.com/johtso/CoffeePy p>

I'd like to play around with integrating coffeescript into my dev process. But as I see it, I'll have to make a bat file that iterates a set of coffee files and spits out js files. Every time I write a bat file, useful as they may be, I ask myself: is there a better way?

Which makes me wonder: is there an app of some sort for Windows that will watch a directory or a file and spit out one/many js files when a coffee file is saved? I'm thinking of building one but don't want to reinvent the wheel. I looked around and found things that were similar but nothing that elevated it beyond "run this command line" on Windows.

Edit: already marked an answer, but looking at this 10 months later the answer is: grunt. Because it'll do a lot more than just auto-compile your coffeescript and you'll probably need to do more than just that to get your app going.

解决方案

See update at bottom of post.

I was hunting for the same thing the other day and came across this: https://github.com/danenania/CoffeePy

It's a simple python script that uses PyV8 to run coffee-script.js.

It doesn't do anything fancy, just watches a folder recursively, and compiles any .coffee files whenever they're changed. It doesn't even have a bare option. These things could be very easily added though!

Edit:

I forked the script and added --bare and --output options.

You can get it here: https://github.com/johtso/CoffeePy

这篇关于有没有coffeescript自动编译/文件观察器的Windows?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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