private static void NpmDocumentHandler(Document document, OutputWindowWriter windowWriter) { if (document.IsNpmUpdateDisable()) { return; } _hasNpmInstalled = _hasNpmInstalled ? _hasNpmInstalled : NodePackageUtils.TryRegisterNpmFromDefaultLocation(); if (!_hasNpmInstalled) { windowWriter.Show(); windowWriter.WriteLine("Node.js Installation not detected. Visit http://nodejs.org/ to download."); return; } document.TryRunNpmInstall(windowWriter); }
private static void NpmDocumentHandler(Document document, OutputWindowWriter windowWriter) { if (document.IsNpmUpdateDisable() || MajorVisualStudioVersion == 14 || (MajorVisualStudioVersion == 12 && ExtensionManager.HasExtension("Package Intellisense"))) { return; } _hasNpmInstalled = _hasNpmInstalled ? _hasNpmInstalled : NodePackageUtils.TryRegisterNpmFromDefaultLocation(); if (!_hasNpmInstalled) { windowWriter.Show(); windowWriter.WriteLine("Node.js Installation not detected. Visit http://nodejs.org/ to download."); return; } document.TryRunNpmInstall(windowWriter); }
public static void HandleNpmPackageUpdate(this Document document, OutputWindowWriter windowWriter) { string path = document.GetProjectPath(); //If package.json and is at the root of the project if (document.Name.EqualsIgnoreCase("package.json") && document.Path.EqualsIgnoreCase(path)) { if (document.IsNpmUpdateDisable()) { return; } hasNpmInstalled = hasNpmInstalled ? hasNpmInstalled : NodePackageUtils.TryRegisterNpmFromDefaultLocation(); if (!hasNpmInstalled) { windowWriter.Show(); windowWriter.WriteLine("Node.js Installation not detected. Visit http://nodejs.org/ to download."); return; } document.TryRunNpmInstall(windowWriter); } }