]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/coffee/README.md
initial
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / coffee / README.md
1 # Coffeescript Plugin
2
3 This plugin provides aliases for quickly compiling and previewing your
4 coffeescript code.
5
6 When writing Coffeescript it's very common to want to preview the output of a
7 certain snippet of code, either because you want to test the output or because
8 you'd like to execute it in a browser console which doesn't accept Coffeescript.
9
10 Preview the compiled result of your coffeescript with `cf "code"` as per the
11 following:
12
13 ```zsh
14 $ cf 'if a then b else c'
15 if (a) {
16   b;
17 } else {
18   c;
19 }
20 ```
21
22 Also provides the following aliases:
23
24 * **cfc:** Copies the compiled JS to your clipboard. Very useful when you want
25            to run the code in a JS console.
26
27 * **cfp:** Compiles from your currently copied clipboard. Useful when you want 
28            to compile large/multi-line snippets
29
30 * **cfpc:** Paste coffeescript from clipboard, compile to JS, then copy the
31             the result back to clipboard.