Skip to main content
DevTools24

package.json 生成器

使用不同项目类型的预设生成 package.json 文件。配置元数据、脚本和依赖项。

echo '{}' > package.json
# Then paste generated content, or:
npm init -y

package.json - 技术详情

package.json is the manifest file for Node.js projects. It contains project metadata, scripts for automation, dependencies, and configuration. Required fields are name and version. Common scripts include start, build, test, and dev.

命令行替代方案

# Initialize package.json\nnpm init -y\n\n# Add dependencies\nnpm install express\nnpm install -D typescript

参考

查看官方规范