Add NPM package management to existing project

Nov 27, 2013 at 4:56 PM
Hey, great project! I just presented your guy's work @ my company and everyone's really pumped!

I was wondering if there's any way to roll the NPM package management piece into existing projects? I'd love to be able to leverage that.

Nov 28, 2013 at 1:19 PM
Hi Nick,

I'm not sure exactly what you mean, but hopefully the following is helpful...

You can certainly use it to manage npm packages in existing node projects: just open up Visual Studio and go to File > New Project, then Other Languages > JavaScript, and then choose to create a new project from existing code.

If you want to reuse the npm code in another .NET application this should also be relatively straightforward. The npm API is all wrapped up in the Microsoft.NodejsTools.Npm assembly, and you'll find the UI in the NpmUI namespace in the Nodejs project, which compiles down to the Microsoft.NodejsTools assembly. Be warned that, in particular, the NpmUI code is very unstable and much of it will change over the next couple of months. The npm API is also undergoing change as well - remember, this is only an alpha. Many of the changes to the latter are extensions to the functionality but, inevitably, there will be some refactoring.

Depending on what you want/need you can pull/fork direct from master, but if you want the latest editions pull from the rgnpm01 fork. Please check the commit log for the latest changes.

If you need anything else, please shout!


Nov 28, 2013 at 4:02 PM
Also, here are instructions for building NTVS from source: