製作器

使用 Electron Forge 為 Electron 應用程式產生平台特定的發佈檔案。

製作器是 Electron Forge 將您封裝的應用程式轉換為平台特定發佈檔案(例如 DMG、EXE 或 Flatpak 檔案等)的方式。

每個製作器都必須在您的 Forge 設定的 makers 區段中進行設定,指定要為哪些平台執行以及製作器特定的設定。例如:

module.exports = {
  makers: [
    {
      name: '@electron-forge/maker-zip',
      platforms: ['darwin', 'linux'],
      config: {
        // the config can be an object
      }
    },
    {
      name: '@electron-forge/maker-dmg',
      config: (arch) => ({
        // it can also be a function taking the currently built arch
        // as a parameter and returning a config object, e.g.
      })
    }
  ]
};

請注意,所有製作器對於 platforms 值都有邏輯預設值,因此您通常不需要指定該屬性。

上次更新時間