npm-prefix.1 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .TH "NPM\-PREFIX" "1" "October 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-prefix\fR \- Display prefix
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm prefix [\-g]
  9. .fi
  10. .RE
  11. .P
  12. Note: This command is unaware of workspaces\.
  13. .SS Description
  14. .P
  15. Print the local prefix to standard output\. This is the closest parent directory
  16. to contain a \fBpackage\.json\fP file or \fBnode_modules\fP directory, unless \fB\-g\fP is
  17. also specified\.
  18. .P
  19. If \fB\-g\fP is specified, this will be the value of the global prefix\. See
  20. npm help \fBconfig\fP for more detail\.
  21. .SS Example
  22. .P
  23. .RS 2
  24. .nf
  25. npm prefix
  26. /usr/local/projects/foo
  27. .fi
  28. .RE
  29. .P
  30. .RS 2
  31. .nf
  32. npm prefix \-g
  33. /usr/local
  34. .fi
  35. .RE
  36. .SS Configuration
  37. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS START \-\->
  38. <!\-\- automatically generated, do not edit manually \-\->
  39. <!\-\- see lib/utils/config/definitions\.js \-\->
  40. .SS \fBglobal\fP
  41. .RS 0
  42. .IP \(bu 2
  43. Default: false
  44. .IP \(bu 2
  45. Type: Boolean
  46. .RE
  47. .P
  48. Operates in "global" mode, so that packages are installed into the \fBprefix\fP
  49. folder instead of the current working directory\. See
  50. npm help folders for more on the differences in behavior\.
  51. .RS 0
  52. .IP \(bu 2
  53. packages are installed into the \fB{prefix}/lib/node_modules\fP folder, instead
  54. of the current working directory\.
  55. .IP \(bu 2
  56. bin files are linked to \fB{prefix}/bin\fP
  57. .IP \(bu 2
  58. man pages are linked to \fB{prefix}/share/man\fP
  59. .RE
  60. <!\-\- automatically generated, do not edit manually \-\->
  61. <!\-\- see lib/utils/config/definitions\.js \-\->
  62. <!\-\- AUTOGENERATED CONFIG DESCRIPTIONS END \-\->
  63. .SS See Also
  64. .RS 0
  65. .IP \(bu 2
  66. npm help root
  67. .IP \(bu 2
  68. npm help bin
  69. .IP \(bu 2
  70. npm help folders
  71. .IP \(bu 2
  72. npm help config
  73. .IP \(bu 2
  74. npm help npmrc
  75. .RE