Editing CoffeeScript

For the next few chapters, you’ll be learning the CoffeeScript language by running short examples. To get the most out of this experience, I highly recommend entering these examples into your favorite editor, taking advantage of the best available CoffeeScript plugins for syntax highlighting and execution without switching to the shell.

Personally, I use Sublime Text 3, a sleek, modern editor that runs natively across all major platforms. Maybe you prefer a more old-school editor, such as Vim or Emacs. Or maybe you’re into rich IDEs, such as Eclipse or IntelliJ. No matter what editor you use, there’s a good chance that someone has written CoffeeScript integration for it. A good first place to look is a page on the CoffeeScript wiki.[25]

Most plugins rely on the coffee utility you installed earlier in this chapter to compile and run CoffeeScript, so you may need to tell the plugin where that utility (and perhaps also node) can be found. You can track down those paths with which (or its Windows equivalent, where):

 $ ​​which​​ ​​coffee
 /usr/local/bin/coffee

Before proceeding to the next chapter, make sure you have a plugin that gives you the ability to run the CoffeeScript file you’re editing (and show you the output) with a single keystroke. Trust me: you’ll have a lot more fun that way.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.189.23