Skip to content
This repository has been archived by the owner on Dec 24, 2018. It is now read-only.

installing npm from github #30

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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