Skip to content

Instantly share code, notes, and snippets.

@adamstallard
Created August 28, 2013 05:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save adamstallard/6362557 to your computer and use it in GitHub Desktop.
Save adamstallard/6362557 to your computer and use it in GitHub Desktop.
Run Configurations for running grunt from the IntelliJ (webstorm) IDE. You need my fork of grunt (which fixes pipe output) to use it.
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Grunt" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="C:/Program Files/nodejs/node" path-to-js-file="$USER_HOME$/AppData/Roaming/npm/node_modules/grunt-cli/bin/grunt" application-parameters="--stack" working-dir="$PROJECT_DIR$">
<RunnerSettings RunnerId="NodeJS.debug" />
<RunnerSettings RunnerId="NodeJS.run" />
<ConfigurationWrapper RunnerId="NodeJS.debug" />
<ConfigurationWrapper RunnerId="NodeJS.run" />
<method />
</configuration>
</component>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Grunt Debug" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="C:/Program Files/nodejs/node" path-to-js-file="$USER_HOME$/AppData/Roaming/npm/node_modules/grunt-cli/bin/grunt" application-parameters="--verbose --debug 9 --stack" working-dir="$PROJECT_DIR$">
<RunnerSettings RunnerId="NodeJS.debug" />
<RunnerSettings RunnerId="NodeJS.run" />
<ConfigurationWrapper RunnerId="NodeJS.debug" />
<ConfigurationWrapper RunnerId="NodeJS.run" />
<method />
</configuration>
</component>
@adamstallard
Copy link
Author

May need some tweaking depending on your environment

@DanKaplanSES
Copy link

I don't know anything about this. Does this require some Node Plugin to be installed first? I usually just run grunt with a watch task in the node console instead.

@Bartvds
Copy link

Bartvds commented Aug 28, 2013

This looks better then naïvely using grunt as an External Tool, which I currently use a lot.

Is it possible to use this configuration but still have multiple instances of it with different tasks? So I can configure WebStorm with a set of custom buttons and/or shortcuts to trigger common task names? (I currently use that a lot with the External Tool variant)

Also: will this work with the standard grunt release? I'd prefer to have my open source projects using the main version.

@outrightmental
Copy link

Wow! I just updated IntelliJ and the following super sweet panel appeared. It's an awesome new set of IntelliJ features (released within the WebStorm product) that any avid IntelliJ IDEA user building javascript-full-stack web applications ought to check out.

http://blog.jetbrains.com/blog/2014/04/28/webinar-recording-webstorm-8-mastering-angularjs-spy-js-grunt-and-multi-selection-workflows/

@dalemanthei
Copy link

I'm using the stock grunt but was having trouble getting a grunt run configuration created. Your gists were enough to let me set up my grunt run configurations using the WebStorm UI. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment