← 全部工具

package.json 產生器

編輯 npm 中繼資料、指令、相依套件及發布資料,預覽並下載 package.json。

package-json-generator本機處理

正在啟用本機工具…

設定

專案中繼資料

每行一筆。相依套件以「套件名稱 版本」填寫,版本也可使用套件庫標籤。快速選擇會加入 latest,可在清單內直接編輯。

執行期相依套件
開發相依套件
發布設定

npm 套件資訊格式

結果

package.json

{
  "name": "sample-app",
  "version": "1.0.0",
  "private": true,
  "type": "module",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "start": "node index.js",
    "test": "node --test"
  },
  "engines": {
    "node": ">=22"
  }
}
下載 package.json

如何使用這個工具

編輯 npm 中繼資料、指令、相依套件及發布資料,預覽並下載 package.json。

不適合用在什麼情況

相依套件可用支援的套件庫版本範圍及標籤。指令只匯出為文字,不連線至 npm。