• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict'
2
3const npm = require('../npm.js')
4var packageId = require('../utils/package-id.js')
5const log = require('npmlog')
6
7module.exports = binLinksOpts
8
9function binLinksOpts (pkg) {
10  return {
11    ignoreScripts: npm.config.get('ignore-scripts'),
12    force: npm.config.get('force'),
13    globalBin: npm.globalBin,
14    globalDir: npm.globalDir,
15    json: npm.config.get('json'),
16    log: log,
17    name: 'npm',
18    parseable: npm.config.get('parseable'),
19    pkgId: packageId(pkg),
20    prefix: npm.config.get('prefix'),
21    prefixes: [
22      npm.prefix,
23      npm.globalPrefix,
24      npm.dir,
25      npm.root,
26      npm.globalDir,
27      npm.bin,
28      npm.globalBin
29    ],
30    umask: npm.config.get('umask')
31  }
32}
33