Is it possible to run a terminal command as run configuration?

I have a simple Web App and I am currently running it via the built in WebStorm terminal. The command in particular is `live-server` its an npm package that reloads my webpage, whenever I change a file. Now what I want to do is, instead of manually running the command via the terminal, I would like to run it as a run configuration. However I do not see how I can configure a terminal command. Is this even possible?

Thanks in advance,

FrankenApps

3 comments
Comment actions Permalink

As of August 2021, the "Shell Script" run configuration now has a new "Execute" toggle to select "Script file" or "Script text."

That "Script text" will allow you to type in your command as you would in the terminal.

3
Comment actions Permalink

Hi there,

If you can run it as Gulp/Grunt task or NPM script .. then you can create Run Configuration or corresponding type .. or just run through Gulp/Grunt/NPM panel directly.

For example: https://www.jetbrains.com/help/webstorm/2016.3/using-gulp-task-runner.html?search=gulp

1
Comment actions Permalink

NPM scripts can be run via NPM run configuration (as @Andriy mentioned) - see https://www.jetbrains.com/help/webstorm/2016.3/run-debug-configuration-npm.html.

I can also suggest trying the Bash Support plugin (http://plugins.jetbrains.com/plugin/4230?pr=idea) - it has a kind of 'generic' run configuration that can be used for running arbitrary executable. See if it works for you. But note that it's a third-party plugin JetBrains is not responsible for

Another option is using the External Tools - see http://www.jetbrains.com/webstorm/webhelp/configuring-third-party-tools.html and related Help topics

1

Please sign in to leave a comment.