Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improve install process.

Remove the install-npm.js.
Add install-stable, install, and link Make commands.  The default is still to do install-stable.
  • Loading branch information...
commit 743d3872399defb7877abcc77e49bfd1a6b268e5 1 parent 2cdd515
@isaacs isaacs authored
Showing with 12 additions and 20 deletions.
  1. +12 −2 Makefile
  2. +0 −18 install-npm.js
View
14 Makefile
@@ -4,8 +4,18 @@ docs = $(shell ls doc/*.md \
|sed 's|doc/|man/|g' \
)
+install-stable:
+ ./cli.js --auto-activate always install npm@stable
+
install:
- @node install-npm.js
+ ./cli.js --auto-activate always install .
+
+link:
+ ./cli.js --auto-activate always link .
+
+uninstall:
+ @echo TODO: have npm uninstall itself.
+ @echo See http://github.com/isaacs/npm/issues/issue/27
man:
@mkdir man
@@ -16,4 +26,4 @@ doc: man $(docs)
man/%.1: doc/%.md
ronn --roff $< > $@
-.PHONY: install doc clean uninstall
+.PHONY: install install-stable link doc clean uninstall
View
18 install-npm.js
@@ -1,18 +0,0 @@
-var npm = require("./npm")
- , sys = require("sys")
- , semver = require("./lib/utils/semver")
-
-npm.commands.install(["npm"], function (er) {
- if (er) {
- sys.error("\nFail!\n")
- throw er
- }
- var npmVer = semver.maxSatisfying(Object.keys(npm.get("npm").versions), "")
- npm.commands.activate(["npm", npmVer], function (er, ok) {
- if (er) {
- sys.error("\nFailed to activate\n")
- throw er
- }
- sys.puts("It worked!")
- })
-})
Please sign in to comment.
Something went wrong with that request. Please try again.