This Question is Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
3 Replies Last post: Sep 19, 2012 2:18 PM by mstock  
mstock Newbie 4 posts since
Aug 7, 2012
Currently Being Moderated

Aug 7, 2012 12:27 PM

More Build System Comfort

In my JavaScript project, I am using the build tool grunt. The current build workflow is as follows:

  1. Save changes in WebStorm
  2. Run grunt.cmd in the project directory via command line (I am on Windows)
  3. Refresh Web Browser


Basically I want to have a Run Configuration where I can at least run a command line script (i.e. batch file). Then the build workflow could go down to save changes and hit the run button.


So, my questions are:

  1. How can I run a script from WebStorm via a button/shortcut?
  2. Can I also run a script when a file is saved?
    This would be interesting for running unit tests only (grunt is task-based).
Andriy Bazanov Master 5,110 posts since
May 28, 2010
Currently Being Moderated
Aug 7, 2012 12:58 PM in response to: mstock
Re: More Build System Comfort

Hi there,


You can try this:

  1. Use External Tools (Settings | External Tools) to create a "external" command.
  2. Now you can customize toolbar and should be able to add it there ... or just assign custom shortcut directly to such External Tools entry (Settings | Keymap).


Now the workflow will be: Save file and click icon/press another shortcut.


As for the second question -- No, currently it is not possible. There should be a ticket for such request for sure -- you are not the first person who asks for such functionality -- you should be able to find it on Issue Tracker:



More Like This

  • Retrieving data ...