Skip to content

Instantly share code, notes, and snippets.

@mykohsu
mykohsu / npm.cmd
Last active February 4, 2016 02:29 — forked from giggio/npm.cmd
Alternative npm.cmd for VS201X node tools integration. Caches npm ls -g result until a different npm command is issued.
:: VS201X alternative for %PROGRAMFILES%\nodejs\npm.cmd
@ECHO OFF
SETLOCAL
SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
SET "NODE_EXE=node"
)
@mykohsu
mykohsu / npm.cmd
Last active February 4, 2016 02:29
Alternative npm.cmd for VS201X node tools integration. Caches npm ls -g result until a different npm command is issued.
:: VS201X alternative for %APPDATA%\nodejs\npm.cmd
@ECHO OFF
SETLOCAL
SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST %NODE_EXE% (
SET PATHEXT=%PATHEXT:;.JS;=;%
SET "NODE_EXE=node"
)
/*
* Copyright (C) 2004 Baron Schwartz <baron at sequent dot org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, version 2.1.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more