Welcome to mirror list, hosted at ThFree Co, Russian Federation.

install-npm.js - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 79193ca1dca9fbde23afac69574c04860cf1743e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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!")
  })
})