Sublime Forum

Coffee Compile

#1

This package allows you to compile some or all of your CoffeeScript, right from the editor. The JavaScript output will even have syntax highlighting!

To use it, just highlight some CoffeeScript code, right click and select the Coffee Compile command. To compile the whole file, do the same thing but don’t highlight any text.

You can get it from Package Control or pull it straight from the repo:
https://github.com/surjikal/sublime-coffee-compile

0 Likes

#2

Cool. Would it be possible to have it compile with the ‘-b’ option, to get rid of the closure? At least when compiling just a selection.

0 Likes

#3

It stopped working for me after upgrading to Mac OSX 10.8 Mountain Lion. Using Sublime build 2215
It has a problem accessing the path.
I’m getting this:

[Errno 2] No such file or directory [cmd: [u'coffee', u'--print', u'--lint', u'--eval', u'window.Color = "color"] [dir: /Users/allen/Burt/rich_app_frontend/app/assets/javascripts/lib] [path: /usr/bin:/bin:/usr/sbin:/sbin]

I changed coffee to an absolute path /usr/local/bin/coffee, and now I get this:

env: node: No such file or directory

I really like this plugin! do you guy have any idea what might be a solution?

0 Likes

#4

Adding path solved my problem for now. but it’s a really weird bug that sublime can not access PATH on the mac sometimes. Apparently others have struggled with this bug for a long time.

window.run_command("exec", { "cmd": "coffee", "--print", "--bare", "--lint", "--eval", text], "quiet": True, "path" : "/usr/local/bin" })

0 Likes

#5

Thanks.

By the way, your color scheme and font looks nice.

What is your color scheme and font ?

0 Likes