List Npm Package Content

作者 vercel5028fa46b4b4無授權條款收錄於 2026年10月8日更新於 2026年10月8日

List the contents of an npm package tarball before publishing. Use when the user wants to see what files are included in an npm bundle, verify package contents, or debug npm publish issues.

AI 產生的概覽

在發佈前列出 npm 套件 tarball 中的檔案,用來核對打包內容。

功能
此技能會檢查 npm 套件 tarball,並列出將上傳到 npm、供使用者下載的確切檔案。它附帶一支 shell 指令碼,會建置套件、產生 tarball、列出其內容並自動清理。它也說明哪些檔案會被納入,依據是 package.json 的 files 欄位、.npmignore、.gitignore,以及 npm 預設一律包含與一律排除的規則。
適用情境
當使用者想查看 npm 套件中包含哪些檔案、在發佈前核對套件內容,或排查 npm publish 問題時使用。
執行需求
需要具備 bash、npm 與 Node.js 工具的 shell 環境,用來建置套件並產生 tarball。它附帶可執行指令碼 scripts/list-package-files.sh,需在套件目錄中執行。

List npm Package Content

This skill lists the exact contents of an npm package tarball - the same files that would be uploaded to npm and downloaded by users.

Usage

Run the script from the package directory (e.g., packages/ai):

bash
bash scripts/list-package-files.sh

The script will build the package, create a tarball, list its contents, and clean up automatically.

Understanding Package Contents

The files included are determined by:

  1. files field in package.json - explicit allowlist of files/directories
  2. .npmignore - files to exclude (if present)
  3. .gitignore - used if no .npmignore exists
  4. Always included: package.json, README, LICENSE, CHANGELOG
  5. Always excluded: .git, node_modules, .npmrc, etc.

來源與署名

來源:vercel/ai位於skills/list-npm-package-content提交5028fa4

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架