Closed scottaddie closed 8 years ago
This was fixed with commit https://github.com/madskristensen/NpmTaskRunner/commit/76622f0b82f99f8a79d398d07471a4b1fa3b5501
The Failed to run...
issue will be fixed by TRX in a future release.
Is it really useful to show just the install task when there is a context-menu item in Solution Explorer to Restore Packages and saving package.json auto-installs?
It's debatable, and I could take either side. The target audience for this extension seems to be those who use more advanced features of npm (e.g., custom scripts & predefined tasks). With that in mind, it's reassuring and convenient to see an option such as "install" here. It's obvious that the option maps to the npm install
command, and the extension serves as the launching point for common npm commands. Confusion sets in when I see "Restore Packages" in the context menu. I ask myself question such as: "Is that menu item rolling up multiple npm commands into a single click?" For example, what is it doing in addition to npm install
, if anything?
Installed product versions
Description
The extension is unusable when no scripts are defined in
package.json
. By "unusable", I mean that the "package.json" node doesn't appear in Task Runner Explorer.Steps to recreate
package.json
file.scripts
property inpackage.json
should either be empty or not present at all. In the case of an emptyscripts
property, something like this would reproduce the problem:In this example, "WebApplication1" was the name given to the ASP.NET project.
Current behavior
The current behavior is incorrect because the Defaults node of the extension is still useful without scripts.
Expected behavior
After the fix is in place, the Defaults node will appear with "install" as an option:
Also as part of my forthcoming fix, the
restart
node will appear only when one of the following scripts exists inpackage.json
:prerestart
prestop
stop
poststop
restart
prestart
start
poststart
postrestart
It was also decided that most users will publish npm modules from outside of the IDE (e.g., from the command shell). Consequently, the
publish
node is being removed from Defaults as well.