This project is read-only.

NodeJS tools for non Node-JS project

Jan 25, 2015 at 5:59 AM
I have frequently been known to stick a node_modules directory in other VS project types. For instance, C#, in order to callout to Node tools from MSBuild.

It would be nice if the VS NodeJS tools were enabled for any project with a package.json file.
Feb 5, 2015 at 3:45 AM
Hi wasabi, would you mind elaborating a little on your use case (project type, scenario, etc.) and exactly what NTVS features you want to enable? Are you looking for something similar to ASP.NET vNext's npm support?
Feb 6, 2015 at 6:06 PM
I think the VS tools should work in ANY project type that has a node_modules directory. My specific case is a C# project that has TypeScript items in it. I don't see there being a need for a special project type (.njsproj) to enable the NPM tools. They could appear with a ProjectTypeGuid set on any project type. Or auto detection of a node_modules directory. Or whatever.

Feb 6, 2015 at 10:49 PM
Gotcha - unfortunately implementing the solution explorer UI wouldn't wouldn't be as simple as enabling it for other project types because NTVS is based on MPFProj, which is a different project system than the rest of Visual Studio. Additionally, things could start getting out of hand if we begin messing with other project types that we don't test - I'm unconvinced it would be worth the time investment. We also don't want to unnecessarily clutter other project types.

That said, we might be able to enable the npm install dialog and the .npm command in the interactive window for non-NTVS projects. Would that be sufficient?

As far as making it work for other project types in the future, if you give me a better idea of why you'd want to use a node module elsewhere - why is this a valuable/common scenario to support? - it'll give me something to forward it on to another team and see if they might be interested in working with us to support that scenario (a real "user request" would be weighted more highly than my own contrived scenario :-) )