是否有适用于 Windows 的咖啡脚本自动编译/文件观察器? [英] is there a coffeescript auto compile / file watcher for windows?

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

问题描述

我想尝试将 coffeescript 集成到我的开发流程中.但正如我所看到的,我将不得不制作一个 bat 文件来迭代一组咖啡文件并吐出 js 文件.每次我写一个可能有用的 bat 文件时,我都会问自己:有没有更好的方法?

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?

这让我想知道:是否有某种适用于 Windows 的应用程序可以监视目录或文件并在保存咖啡文件时吐出一个/多个 js 文件?我正在考虑建造一个,但不想重新发明轮子.我环顾四周,发现了一些相似的东西,但除了在 Windows 上运行此命令行"之外,没有任何东西可以提升它.

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.

已经标记了一个答案,但在 10 个月后查看这个答案是:grunt.因为它不仅可以自动编译您的coffeescript,而且您可能还需要做更多的事情才能让您的应用程序运行起来.

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.

推荐答案

coffee --watch -o lib -c src

其中 src 是包含咖啡文件的目录,lib 是 JavaScript 输出目录.

where src is a directory containing your coffee files, and lib is your JavaScript output directory.

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

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