You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An old version for Sublime Text 2 is accessible via the [`st2` branch](https://github.com/SublimeText/BetterCoffeeScript/tree/st2).
5
-
6
-
## Description
3
+
[CoffeeScript](https://coffeescript.org/) syntax definitions build system and snippets for [Sublime Text](https://www.sublimetext.com).
7
4
8
-
CoffeeScript plug-in was originally created by @Xavura. As I, @aponxi, began writing a lot of code in CoffeeScript, I felt the need for side-by-side view for compiled CoffeeScript. Since Xavura's repository have been inactive I decided to branch out my own version. The biggest change in my branch is the Watch Mode which updates the compiled JavaScript view whenever you modify the CoffeeScript thus enabling you to view your progress side-by-side.
5
+

9
6
10
-
## Contributing
11
-
12
-
- Please use the [issues page](https://github.com/SublimeText/BetterCoffeeScript/issues) to make requests or report bugs.
13
-
- Please make _pull requests_ to the `master` branch only. ST2 is not supported anymore.
7
+
**This package is for Sublime Text 3+**.
8
+
An old version for Sublime Text 2 is accessible via the [`st2` branch](https://github.com/SublimeText/BetterCoffeeScript/tree/st2).
14
9
15
10
# Installation
16
11
17
-
## via Package Control
18
-
19
-
> This is the recommended installation method.
12
+
### Package Control
20
13
21
-
If you have [Package Control](https://packagecontrol.io/), you know what to do. If not, well: it's a package manager for Sublime Text 3. Installation guide can be [found here](https://packagecontrol.io/installation). After installing the package manager:
14
+
The easiest way to install is using [Package Control](https://packagecontrol.io). It's listed as `CoffeeScript`.
22
15
23
-
* Open the Command Pallete (`ctrl+shift+P` or `cmd+shift+P`).
24
-
* Type "Install Package" and hit return.
25
-
* Type "CoffeeScript" and hit return.
16
+
1. Open `Command Palette` using <kbd>ctrl+shift+P</kbd> or menu item `Tools → Command Palette...`
17
+
2. Choose `Package Control: Install Package`
18
+
3. Find `CoffeeScript` and hit <kbd>Enter</kbd>
26
19
27
-
## via Source Control
20
+
## Source Control
28
21
29
-
> If you plan to contribute, then you should install via this method. Otherwise it is recommended that you install the package via Package Control, see above.
22
+
> [!TIP]
23
+
>
24
+
> Only recommended, if contributions to this package are planned.
30
25
31
26
Sublime stores packages in the following locations:
### As a repository outside of the packages directory
49
44
50
45
If you use Github for Mac/Windows which store repositories in a specific location, or if you just don't want a repository in your packages directory, then instead you can use a link.
51
46
52
-
If you don't yet have the repository, then grab it via your GUI program or via the command line:
@@ -86,8 +86,6 @@ Context menu has `Compile Output` that compiles the current CoffeeScript and out
86
86
87
87
**Note:** Some of the commands use the Status Bar for output, so you'll probably want to enable it (View » Show Status Bar).
88
88
89
-
90
-
91
89
# Snippets
92
90
93
91
- Use `TAB` to run a snippet after typing the trigger.
@@ -144,7 +142,7 @@ That's what this is for! You would create a `Cakefile` and inside it you would w
144
142
145
143
Go to `Preferences > Package Settings > CoffeeScript > Settings - User` to change settings.
146
144
147
-
```Javascript
145
+
```jsonc
148
146
{
149
147
/*
150
148
The directories you would like to include in $PATH environment variable.
@@ -159,34 +157,34 @@ Go to `Preferences > Package Settings > CoffeeScript > Settings - User` to chang
159
157
The directory containing your coffee binary. Usually
160
158
/usr/local/bin.
161
159
*/
162
-
"binDir":"/usr/local/bin"
160
+
"binDir":"/usr/local/bin",
163
161
164
162
/*
165
163
Compile without the top-level function wrapper (coffee -b).
166
164
*/
167
165
168
-
,"noWrapper":true
166
+
"noWrapper":true,
169
167
170
168
/*
171
169
Enable or disable refresh the compiled Output on Save.
172
170
Only available for watch mode.
173
171
*/
174
-
,"watchOnSave":true
172
+
"watchOnSave":true,
175
173
/*
176
174
Enable refreshing compiled JS when CoffeeScript is modified.
177
175
178
176
Put false to disable
179
177
Put a number of seconds to delay the refresh
180
178
*/
181
-
,"watchOnModified":0.5
179
+
"watchOnModified":0.5,
182
180
/*
183
181
Enable Compiling on save. It will compile into the same folder.
184
182
*/
185
-
,"compileOnSave":true
183
+
"compileOnSave":true,
186
184
/*
187
185
## Enable outputting the results of the compiled coffeescript in a panel
188
186
*/
189
-
,"showOutputOnSave":false
187
+
"showOutputOnSave":false,
190
188
/*
191
189
## Enable compiling to a specific directory.
192
190
#### Description
@@ -201,7 +199,7 @@ Go to `Preferences > Package Settings > CoffeeScript > Settings - User` to chang
201
199
compileDir": "/home/logan/Desktop/out"
202
200
203
201
*/
204
-
,"compileDir":false
202
+
"compileDir":false,
205
203
/*
206
204
## Enable compiling to a specific relative directories.
207
205
@@ -223,38 +221,27 @@ Go to `Preferences > Package Settings > CoffeeScript > Settings - User` to chang
223
221
"/home/user/projects/main.coffee" will compile to "/home/user/projects/js/main.js"
224
222
225
223
*/
226
-
, "compilePaths":false
227
-
228
-
229
-
224
+
"compilePaths":false,
230
225
}
231
-
232
-
233
226
```
234
227
235
228
## Project settings
236
229
237
230
Go to `Project > Edit Project` to change project settings.
238
231
239
-
```Javascript
232
+
```json
240
233
{
241
-
"folders":
242
-
[
243
-
...
234
+
"folders": [
235
+
"."
244
236
],
245
-
"settings":
246
-
{
247
-
"CoffeeScript":
248
-
{
237
+
"settings": {
238
+
"CoffeeScript": {
249
239
"noWrapper": true,
250
240
"compileOnSave": true,
251
241
"compileDir": "out"
252
242
}
253
243
}
254
244
}
255
-
256
-
257
-
258
245
```
259
246
260
247
# FAQ
@@ -294,19 +281,3 @@ This path will go into the `binDir` setting.
294
281
- I'm getting the error message `'coffee' is not recognized as an internal or external command,` when saving.
295
282
296
283
The coffee-script binary probably is not installed. Either install coffee-script or set `checkSyntaxOnSave` and `compileOnSave` to `false` in `Preferences > Package Settings > CoffeeScript > Settings - User`.
297
-
298
-
299
-
300
-
# Latest Changelog
301
-
### v0.7.0 01/June/2013
302
-
303
-
- merged st3 with master branch
304
-
- now the sublime text 2 support is in st2 branch
305
-
- fixed the @ highlight in language definitions
306
-
- fixed an error you would get when it was looking for project settings when it wasn't a project we were editing
307
-
308
-
# Special Thanks
309
-
310
-
311
-
Thanks to [everyone who has contributed to this project](https://github.com/SublimeText/BetterCoffeeScript/graphs/contributors).
0 commit comments