bin-links.js 716 B

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