WebStorm 6.0.1 Web Help

WebStorm provides CoffeeScript support. WebStorm recognizes *.coffee files, and allows you to edit them providing full range of coding assistance without any additional steps from your side. CoffeeScript files are marked with icon_CoffeeScript icon.

To run, debug, and test your code you will need it translated into JavaScript which requires a transpiler and Node.js. For more details on CoffeeScript transpilation, see Transpiling CoffeeScript to JavaScript.

In this section:

Preparing for CoffeeScript development
  1. Make sure the CoffeeScript and Node.js plugins are enabled. The plugins are bundled with WebStorm and activated by default. If they are not, enable the plugins.
  2. Download and install the Node.js framework.
  3. Configure the Node.js interpreter in WebStorm:
    1. Click update_node_js.png on the main toolbar.
    2. On the Node.js page that opens, specify the location of the desired Node.js interpreter.

Coding assistance

CoffeeScript support includes:

  • Code completion for keywords, labels, variables, parameters and functions.
  • Error and syntax highlighting.
  • Code formatting and folding.
  • Refactoring:
    • Common refactoring procedures, such as extract method , inline, rename/move, etc.
    • CoffeeScript-specific refactoring procedures, such as change signature, extract parameter, extract variable. These types of refactoring are identical with JavaScript, for more details, see the section JavaScript-Specific Refactorings
  • Code generation
    • Generating code stubs based on file templates during file creation.
    • Possibility to create line and block comments (Ctrl+Slash; Ctrl+DivideCtrl+Slash; Ctrl+Divide/Ctrl+Shift+Slash; Ctrl+Shift+DivideCommand Shift Slash; Command Shift Divide; Command Shift Slash; Command Shift Divide).
    • Navigating with Structure View.
    • Navigate | Declaration (Ctrl+BCtrl+B).
    • Navigate | Implementation (Ctrl+Alt+BCtrl+Alt+B) from overridden method / subclassed class.
  • Compiling to JavaScript for further running, testing, and debugging.
  • Executing CoffeeScript files involves:
    • Possibility to preview results of CoffeeScript files compilation to JavaScript.
    • Possibility to launch CoffeeScript files from the context menu.
    • Run/debug configuration for NodeJS includes the possibility to use CoffeeScript plugin.

See Also

Language and Framework-Specific Guidelines:

External Links:

Web Resources: