WebStorm run command or program on project open

房东的猫 提交于 2021-01-29 04:30:43

问题


Is there any way to run external program or command after I open project in WebStorm?

I've created new external tool which runs database server, and after I click on it in menu, it runs the server and everything works, but I'd like to start this tool automatically on project start. And it'd be awesome if it could also open web browser to certain url which would be database admin tool.


回答1:


If you can launch your desired task using Grunt/Gulp/npm task or any other Run/Debug Configuration then yes -- there is Startup Tasks functionality available at Settings/Preferences | Tools | Startup Tasks.

Note that you cannot execute External Tools entry directly or launch any DOS/shell command this way.

The easiest way of using this would be creating Grunt/Gulp task that would do your actual job. There you can use exec() method to execute custom command.



来源:https://stackoverflow.com/questions/35279615/webstorm-run-command-or-program-on-project-open

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!