npm-explore.1 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .TH "NPM-EXPLORE" "1" "March 2026" "NPM@11.12.0" ""
  2. .SH "NAME"
  3. \fBnpm-explore\fR - Browse an installed package
  4. .SS "Synopsis"
  5. .P
  6. .RS 2
  7. .nf
  8. npm explore <pkg> \[lB] -- <command>\[rB]
  9. .fi
  10. .RE
  11. .P
  12. Note: This command is unaware of workspaces.
  13. .SS "Description"
  14. .P
  15. Spawn a subshell in the directory of the installed package specified.
  16. .P
  17. If a command is specified, then it is run in the subshell, which then immediately terminates.
  18. .P
  19. This is particularly handy in the case of git submodules in the \fBnode_modules\fR folder:
  20. .P
  21. .RS 2
  22. .nf
  23. npm explore some-dependency -- git pull origin master
  24. .fi
  25. .RE
  26. .P
  27. Note that the package is \fInot\fR automatically rebuilt afterwards, so be sure to use \fBnpm rebuild <pkg>\fR if you make any changes.
  28. .SS "Configuration"
  29. .SS "\fBshell\fR"
  30. .RS 0
  31. .IP \(bu 4
  32. Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows
  33. .IP \(bu 4
  34. Type: String
  35. .RE 0
  36. .P
  37. The shell to run for the \fBnpm explore\fR command.
  38. .SS "See Also"
  39. .RS 0
  40. .IP \(bu 4
  41. npm help folders
  42. .IP \(bu 4
  43. npm help edit
  44. .IP \(bu 4
  45. npm help rebuild
  46. .IP \(bu 4
  47. npm help install
  48. .RE 0