my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
919 B

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