Duroktar / vscode-npm-scripts

View and run NPM scripts in the sidebar
MIT License
28 stars 13 forks source link

More options than click to run #9

Open Zodiase opened 6 years ago

Zodiase commented 6 years ago

In my case some scripts can have negative side-effects if accidentally run, and some others would require extra arguments to be provided.

What if there's a setting, similar to npm.scriptExplorerAction, that allows clicking to simply open the terminal and types in the command, without running it?

Also I noticed the "clicking" isn't actually clicking; the script is run as soon as the mouse is pressed down. This could be troublesome.

Duroktar commented 6 years ago

Hi! Thanks for the feedback, I'll hit each point individually:

What if there's a setting, similar to npm.scriptExplorerAction, that allows clicking to simply open the terminal and types in the command, without running it?

The now built-in npm scripts "Explorer" can do that I'm pretty sure. But if you don't mind waiting a bit until my next sprint on here I can certainly implement that for you :)

Also I noticed the "clicking" isn't actually clicking; the script is run as soon as the mouse is pressed down. This could be troublesome.

Oh snap. Yeah that should really be on click "up" :D good catch 💯

PS: If someone were to make a PR for any of this stuff I'd merge it right in. Otherwise I may not be able to get to this for another week or so (maybe sooner). Cheers

warrendodsworth commented 5 years ago

Additionally, a refresh button in the panel heading would be great. Else when I add a script to package.json I need to close and restart vs code.