Build NW.js applications for Mac, Windows and Linux.
Install via npm
or your package manager of choice:
npm install nw-builder
At a glance module usage:
import { nwbuild } from "nw-builder";
nwbuild({
srcDir: "./nwapp", // directory to store nw app files
version: "0.69.1", // latest or stable or 0.x.y
flavour: "sdk", //sdk (dev) or normal (prod)
platform: "linux", //linux, osx, win
arch: "x64", //ia32 or x64
outDir: "./build",
// flags with their default values
cacheDir: "./cache", //directory to store nw binaries and shared libraries
downloadUrl: "https://dl.nwjs.io",
manifestUrl: "https://nwjs.io/versions",
run: false, //run app to quickly demo it
noCache: false, //delete and redownload nw version
zip: false, // optionally zip files
});
At a glance CLI usage:
nwbuild ./nwapp --version=0.70.1 --flavour=sdk --platform=linux --arch=x64 --outDir=./build
- Pick and install a Node version manager
- Use your version manager to install Node 14.19 or above
- Run
npm install
npm run demo
to test your changes at first glancenpm t
to run unit tests- Don't forget to run
npm run format && npm run lint
before commiting your changes - Whenever possible, open an issue before submitting a pull request
- Ensure there are tests that cover your changes