'use strict'
var path = require('path')
var npm = require('../../npm.js')
var Installer = require('../../install.js').Installer
var packageId = require('../../utils/package-id.js')
var moduleName = require('../../utils/module-name.js')
module.exports = function (staging, pkg, log, next) {
log.silly('global-install', packageId(pkg))
var globalRoot = path.resolve(npm.globalDir, '..')
npm.config.set('global', true)
var install = new Installer(globalRoot, false, [moduleName(pkg) + '@' + pkg.package._requested.rawSpec])
install.link = false
install.run(function () {
npm.config.set('global', false)
next.apply(null, arguments)
})
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| build.js | File | 412 B | 0644 |
|
| extract-worker.js | File | 473 B | 0644 |
|
| extract.js | File | 3.87 KB | 0644 |
|
| fetch.js | File | 524 B | 0644 |
|
| finalize.js | File | 3.81 KB | 0644 |
|
| global-install.js | File | 656 B | 0644 |
|
| global-link.js | File | 289 B | 0644 |
|
| install.js | File | 266 B | 0644 |
|
| move.js | File | 3.09 KB | 0644 |
|
| postinstall.js | File | 274 B | 0644 |
|
| preinstall.js | File | 272 B | 0644 |
|
| prepare.js | File | 1.03 KB | 0644 |
|
| refresh-package-json.js | File | 1.5 KB | 0644 |
|
| remove.js | File | 2.59 KB | 0644 |
|
| unbuild.js | File | 659 B | 0644 |
|