electron-vue打包不同平台的安装包

2019-11-06 00:39:15 浏览数 (1)

electron-vue的打包

1.package.json加入以下代码

代码语言:javascript复制
"scripts": {
    "build": "node .electron-vue/build.js && electron-builder",
    "build:dir": "node .electron-vue/build.js && electron-builder --dir",
    "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
    "build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
    "win32": "node .electron-vue/build.js && electron-builder --platform=win32 --arch=ia32",
    "mac": "node .electron-vue/build.js && electron-builder --platform=darwin",
    "dev": "node .electron-vue/dev-runner.js",
    "pack": "npm run pack:main && npm run pack:renderer",
    "pack:main": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.main.config.js",
    "pack:renderer": "cross-env NODE_ENV=production webpack --progress --colors --config .electron-vue/webpack.renderer.config.js",
    "postinstall": ""
  }

2.打包

  • win:npm run win32
  • mac:npm run mac

0 人点赞