LoginSignup
6
5

More than 5 years have passed since last update.

WebStorm Settings for CoffeeScript, Grunt, Mocha

Last updated at Posted at 2013-12-24

This tutorial shows how to configure WebStorm for "1-click to build and test" using CoffeeScript, Grunt and Mocha.

Take this repository for example.

External tools > Add

  • Name: grunt build-coffee
  • Tool settings:
    • Program: grunt
    • Parameters: build-coffee
    • Working Directory: $ProjectFileDir$

WebStrom_Preference_External_Tools.png

WebStrom_Preference_External_Tools_Edit.png

Run > Edit Configurations… > Add New Configuration

Replece $ProjectFileDir$ with your actual path.

  • Name: Test
  • Node interpreter: /usr/local/bin/node
  • Mocha node package: $ProjectFileDir$/node_modules/mocha
  • Working directory: $ProjectFileDir$
  • Environmental variables:
    • NODE_PATH: build/app:build/app/components
  • Test directory: $ProjectFileDir$/build/test
  • User interface: BDD
  • Include sub directories: checked
  • Require module:
  • Before launch: External tool:
    • External tool 'grunt build-coffee'

WebStorm_RunDebug_Configuration.png

Run 'Test'

WebStorm_Grunt_Mocha.gif

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5