Develop, build, package and update NW.js applications for Linux, MacOS and Windows.
| Package | Description |
|---|---|
| nw-builder | Build NW.js desktop applications for MacOS, Windows and Linux. |
| @nwutils/builder | Build NW.js applications for Linux, MacOS and Windows. |
| @nwutils/cli | Command line interface for building NW.js applications. |
| @nwutils/doctor | Configure NW.js environments for Linux, MacOS and Windows. |
| @nwutils/getter | Get NW.js and related binaries for Linux, MacOS and Windows. |
| @nwutils/runner | Run NW.js and related binaries for Linux, MacOS and Windows. |
| @nwutils/packager | Package NW.js and related binaries for Linux, MacOS and Windows. |
| @nwutils/build-tools | Compile NW.js from source with fixes for NW.js issues, and test them. |
| @nwutils/upstream-diff | Understand how NW.js changes upstream behaviour. |
Packages and options marked experimental are new and may change or be removed in a minor release: @nwutils/packager, @nwutils/doctor, @nwutils/cli, nw-builder's package mode, app.protocols and app.requestedExecutionLevel.
The goal is a one-command build, sign, package and publish for NW.js apps. Each package is completed first; nw-builder exposes the features once they are done. @nwutils/updater is used alongside the packager to update installed apps.
Every command targets one platform and architecture per run. Building for several targets is the caller's job: run the command once per target.
Done.
- updater
- Verify the update manifest and the downloaded update before installing (the packager signs the manifest with
manifestKeyand the artifact with its own signature; verification is in@nwutils/updater).
- Verify the update manifest and the downloaded update before installing (the packager signs the manifest with
- packager
- A portable Windows executable.
- Flatpak, Snap and Pacman packages. Pacman packaging needs an Arch Linux environment to validate (
pacman,makepkgandrepo-addare not in Debian/Ubuntu), so a built.pkg.tar.zstcan be test-installed before release. - Artifact name templates.
- updater
- Differential (delta) updates.
- Staged rollouts.
- getter
- Download NW.js' Mac App Store builds.
- builder
- A single-file executable on Windows and Linux (
package.nwappended to the binary). - File associations: MacOS
CFBundleDocumentTypesand Linux MIME types.
- A single-file executable on Windows and Linux (
- packager
- Mac App Store: sign with parent and child entitlements and build the
.pkg(asbuild_mas.pydoes). - File associations in the Windows installer.
- Content verification: sign app files into
verified_contents.jsonfor NW.js builds with your own key (build-tools).
- Mac App Store: sign with parent and child entitlements and build the
- Expose every feature above through one configuration and one command.
-
--publishthat builds, signs, packages and uploads a release for one platform and architecture. - Check signing credentials, native-module toolchains and packaging tools with
@nwutils/doctor.
- getter
-
ffmpeg: truealways fails: NW.js' and the community ffmpeg checksums are both cached atcacheDir/shasum/<version>.txt, so the ffmpeg check parses NW.js' plain-text file as JSON. Its checksum URL (api.github.com/.../releases/tags/<version>/SHASUMS256.txt) also needs checking. - A failed or interrupted download leaves a partial file in the cache. The next run reuses it, so the checksum check fails until the cache is deleted by hand. The same happens to a partial
SHASUMS256.txt. - An archive that fails its checksum stays in the cache instead of being downloaded again.
- Downloads have no timeout, so a stalled connection hangs forever.
- Ctrl+C during a download exits with code 0, and the getter takes over
SIGINTfor programs that use it.
-
- runner
-
mode: "run"fails with default options ("Glob option is not supported"):globdefaults totrue. Run mode should default it tofalse.
-
- builder
- Building deletes
outDirwithout checking it, so anoutDirof., the project root, or a folder containingsrcDirdeletes the source code. - The Linux
.desktopfile only works on the build machine:Iconis an absolute path into the build output, andExecis left out unlessapp.execis set. -
app.iconis resolved from the current directory on Windows, but from inside the built app on Linux.
- Building deletes
- nw-builder
- The CLI's
--nodeAddonoption does nothing: everything else readsnativeAddon. - When
versions.jsoncan't be fetched and isn't cached, the real error is hidden and later steps fail on an undefined release. - The CLI doesn't wait for
nwbuild(), so a failure is printed twice.
- The CLI's
npm install
npm run lint
npm run type
npm testEach command fans out across every package in ./packages. To work against a single package, use npm's --workspace flag, e.g. npm test --workspace=@nwutils/getter.
npm run lint also checks that JSDoc matches the code. With Claude Code, run /sync-docs before opening a pull request to update JSDoc descriptions and READMEs for your changes (skills).