forked from microsoft/azuredatastudio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented npm version check (microsoft#314)
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
@echo off | ||
SET SUPPORTEDNPMVERSION=4.2.0 | ||
|
||
setlocal | ||
set npm_config_disturl="https://atom.io/download/electron" | ||
for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:"\"electronVersion\":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a | ||
set npm_config_runtime="electron" | ||
set npm_config_cache=~\.npm-electron | ||
npm %* | ||
endlocal | ||
|
||
for /F "tokens=* USEBACKQ" %%V IN (`npm --version`) do ( | ||
set CURRENTNPMVERSION=%%V | ||
) | ||
if not %CURRENTNPMVERSION%==%SUPPORTEDNPMVERSION% ( | ||
color 0e | ||
echo NPM version %CURRENTNPMVERSION% is not supported with this project. We strongly recommend to use version %SUPPORTEDNPMVERSION% | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters