list-npm-package-content
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseList npm Package Content
列出npm包内容
This skill lists the exact contents of an npm package tarball - the same files that would be uploaded to npm and downloaded by users.
本Skill会列出npm包压缩包的准确内容——也就是会上传到npm并供用户下载的文件。
Usage
使用方法
Run the script from the package directory (e.g., ):
packages/aibash
bash scripts/list-package-files.shThe script will build the package, create a tarball, list its contents, and clean up automatically.
从包目录(例如)运行脚本:
packages/aibash
bash scripts/list-package-files.sh该脚本会自动构建包、创建压缩包、列出其内容并清理。
Understanding Package Contents
理解包内容
The files included are determined by:
- field in
files- explicit allowlist of files/directoriespackage.json - - files to exclude (if present)
.npmignore - - used if no
.gitignoreexists.npmignore - Always included: ,
package.json,README,LICENSECHANGELOG - Always excluded: ,
.git,node_modules, etc..npmrc
所包含的文件由以下因素决定:
- 中的
package.json字段 - 明确允许的文件/目录列表files - - 要排除的文件(如果存在)
.npmignore - - 如果没有
.gitignore则使用此文件.npmignore - 始终包含的文件:、
package.json、README、LICENSECHANGELOG - 始终排除的文件:、
.git、node_modules等.npmrc