目錄
npm-explore
瀏覽已安裝的套件
選擇 CLI 版本
目錄
概要
npm explore <pkg> [ -- <command>]
注意:此指令不了解工作區。
說明
在指定的已安裝套件目錄中產生一個子 shell。
如果指定了指令,則會在子 shell 中執行該指令,然後立即終止。
這在 node_modules
資料夾中的 git 子模組的情況下特別方便
npm explore some-dependency -- git pull origin master
請注意,套件並不會在之後自動重新建置,因此如果您進行任何變更,請務必使用 npm rebuild <pkg>
。
設定
shell
- 預設值:SHELL 環境變數,或在 Posix 上為「bash」,或在 Windows 上為「cmd.exe」
- 類型:字串
要執行 npm explore
指令的 shell。