Ream
Ream

Reputation: 91

How to build coffee script files without generating js files?

In textmate, I can build the coffee script files (command + B) and it will generate the JS files on the flight without creating new files in the same directory. When I tried to build (command + B) in sublime text 2, it somehow generates JS files in the same directory. How to avoid this so that it behaves the same way like textmate?

Upvotes: 3

Views: 1626

Answers (1)

ReneGAED
ReneGAED

Reputation: 2263

Sublime text 2 does allow you to do this as well. Go to Package Manager and download CoffeeCompile https://github.com/surjikal/sublime-coffee-compile.

Once you have installed this package you would typically right click on an open .coffee file and select "Coffee Compile". However Mac OSX Mountain Lion seems to have issues using your path variable to find the coffee command and may throw an error along the lines of: [Errno 2] No such file or directory.

If you get this problem do the following: 1. Go to ~/Library/Application Support/Sublime Text 2/Packages/CoffeeCompile/coffee_compile.py 2. Go to line 34 under 'quiet': True, 3. Add the following line: 'path' : '/usr/local/bin'

Restart Sublime Text 2 and try Coffee Compile again and it should work.

Upvotes: 1

Related Questions