原文地址:使用nwjs-builder-phoenix构建跨平台桌面应用程序 - BIGTREE (whwtree.com)
NW.js应用自动打包的两种方式:
nwjs-builder-phoenix(推荐)
nw-builder
本文主要讲述使用nwjs-builder-phoenix构建跨平台桌面应用程序,对NW.js项目进行自动化打包。
具体步骤如下:
(1)创建firstapp应用;
(2)修改package.json打包配置;
(3)安装nwjs-builder-phoenix依赖、运行及打包;
通过build --tasks win-x86,win-x64,mac-x64 --mirror https://npm.taobao.org/mirrors/nwjs/ .命令来实现不同平台的打包。
1、创建firstapp应用
1.1执行npm init初始化应用
D:\whw\study\nwjs\firstapp>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help init` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json