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$
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'