Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to setup grunt in webstorm on windows

I am Using Webstorm (PHPStorm) on Windows 7. On the actual project we are using grunt to concatenate javascript and css and also for several other build processes.

I tried to setup the grunt command as an external run command in Webstorm. The settings i tried for that are:

Name: grunt  
Parameters: none  
WorkingDirectory: $ProjectFileDir$

So now when I am trying to start my external run command in Webstorm, I always get the error

> grunt
Cannot run program "grunt" (in directory "C:\Users\jawidmer\workspaces\projectname"): CreateProcess error=2, The system cannot find the file specified

When I open my command line tool and navigate to the project folder, I can start grunt without any problems.

I already searched in google and tried all kinds of different combinations of settings but non of them worked..

Do you have any ideas, what I have to change to be able to start grunt from external run commands in Webstorm?

Thanks Jan

like image 814
user2477219 Avatar asked Jun 12 '13 07:06

user2477219


1 Answers

By your description, I assume that the same way I configured it in my WebStorm installation should work just fine for you too:

Grunt WebStorm configuration

I hope it helps.


UPDATE

It seems that if you add > %TEMP%\grunt & type %TEMP%\grunt & del %TEMP%\grunt to Parameters (like shown in the updated image), the build errors will be shown.

If you need to configure a task (for example grunt watch), the Parameters field must be the following:

watch > %TEMP%\grunt & type %TEMP%\grunt & del %TEMP%\grunt

Tip taken from here

like image 188
gustavohenke Avatar answered Nov 01 '22 15:11

gustavohenke