Skip to content

Commit

Permalink
installing npm from github
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Aug 8, 2014
1 parent 3d36cf3 commit 9fb3693
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions get_npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ var util = require('util'),
wget = require('./wget');

var NPM_PKG_JSON_URL = 'https://raw.githubusercontent.com/joyent/node/%s/deps/npm/package.json';
var NVMW_NODEJS_ORG_MIRROR = process.env.NVMW_NODEJS_ORG_MIRROR || 'http://nodejs.org/dist';
var BASE_URL = NVMW_NODEJS_ORG_MIRROR + '/npm/npm-%s.zip';
var BASE_URL = 'https://github.com/npm/npm/archive/v%s.zip';

var targetDir = process.argv[2];
var nodeVersion = process.argv[3];
Expand Down
4 changes: 3 additions & 1 deletion nvmw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ if not exist "%NODE_EXE_FILE%" (
set "CD_ORG=%CD%"
cd "%NODE_HOME%"
cscript "%NVMW_HOME%\unzip.js" "%NPM_ZIP_FILE%" "%NODE_HOME%"
cd "%CD_ORG%"
mkdir %NODE_HOME%\node_modules
move npm-* %NODE_HOME%\node_modules\npm
copy %NODE_HOME%\node_modules\npm\bin\npm.cmd %NODE_HOME%\npm.cmd
if not exist "%NODE_HOME%\npm.cmd" goto install_error
echo npm %NPM_VERSION% install ok

Expand Down

0 comments on commit 9fb3693

Please sign in to comment.