gentle-fs.js 687 B

1234567891011121314151617181920212223242526272829303132
  1. 'use strict'
  2. const npm = require('../npm.js')
  3. const log = require('npmlog')
  4. module.exports = gentleFSOpts
  5. function gentleFSOpts (gently, base, abs) {
  6. return {
  7. // never rm the root, prefix, or bin dirs
  8. //
  9. // globals included because of `npm link` -- as far as the package
  10. // requesting the link is concerned, the linked package is always
  11. // installed globally
  12. prefixes: [
  13. npm.prefix,
  14. npm.globalPrefix,
  15. npm.dir,
  16. npm.root,
  17. npm.globalDir,
  18. npm.bin,
  19. npm.globalBin
  20. ],
  21. absolute: abs,
  22. log: log,
  23. prefix: npm.prefix,
  24. force: npm.config.get('force'),
  25. gently: gently,
  26. base: base,
  27. name: 'npm'
  28. }
  29. }