"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/install/action/global-install.js" (11 Apr 2017, 606 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 'use strict'
    2 var path = require('path')
    3 var npm = require('../../npm.js')
    4 var Installer = require('../../install.js').Installer
    5 var packageId = require('../../utils/package-id.js')
    6 
    7 module.exports = function (top, buildpath, pkg, log, next) {
    8   log.silly('global-install', packageId(pkg))
    9   var globalRoot = path.resolve(npm.globalDir, '..')
   10   npm.config.set('global', true)
   11   var install = new Installer(globalRoot, false, [pkg.package.name + '@' + pkg.package._requested.spec])
   12   install.link = false
   13   install.run(function () {
   14     npm.config.set('global', false)
   15     next.apply(null, arguments)
   16   })
   17 }