g.pickardou
g.pickardou

Reputation: 35973

What else npm can be used in Visual Studio 2015 besides of installing bower?

Context:

I am configuring my ASP.NET 4.x project to use bower to manage client side packages, using VS 2015 Update 2. (I am following this stackoverflow guide/answer All cool. However after created bower.json, and seeing output I've noticed the following output line:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\Bower.cmd" install --force-latest

This means that VS does not even use the npm installed bower (which is under the /node_modules/bower) instead launching some globally installed (it was not me) bower.

Question:

What else npm can be used in Visual Studio 2015 ASP.NET project especially besides of installing bower?

In case of the answer is nothing, Question 2:

Can I just eliminate npm (package.json), and rely my bower.json in the Visual Studio project (and delete /node_modules)

The whole scenario also begs for the Question+:

Where should I configure Visual Studio to use the npm installed bower instead of the existing "global" installation in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\Bower.cmd

Upvotes: 0

Views: 92

Answers (1)

Joe Davis
Joe Davis

Reputation: 792

npm can also be used to install packages for Gulp or Grunt tasks, which can then be run by the Task Runner Explorer in VS 2015.

You can configure Visual Studio to use a different version of Bower in Tools->Options->Projects and Solutions->External Web Tools. Move $(PATH) to the top of the list to use a globally installed version, or add a new project-relative path to the top of the list.

Upvotes: 1

Related Questions