Get NW.js and related binaries for Linux, MacOS and Windows.
npm install @nwutils/getter
Download NW.js and related binaries for Linux, MacOS and Windows.
1. Install Volta
1. npm i to install third party dependencies
``js
import get from "@nwutils/getter";
await get({
version: "latest",
flavor: "normal",
platform: "linux",
arch: "x64",
downloadUrl: "https://dl.nwjs.io",
manifestUrl: "https://nwjs.io/versions.json",
cacheDir: "./cache",
cache: true,
ffmpeg: false,
nativeAddon: false,
shaSum: true,
});
`
Options
| Name | Type | Description |
| ---- | ------- | ----------- |
| version | string \| "latest" \| "stable" | Runtime version |"normal" \| "sdk"
| flavor | | Runtime flavor |"linux" \| "osx" \| "win"
| platform | | Host platform |"ia32" \| "x64" \| "arm64"
| arch | | Host architecture |"https://dl.nwjs.io" \| "https://npm.taobao.org/mirrors/nwjs" \| https://npmmirror.com/mirrors/nwjs \| "https://github.com/corwin-of-amber/nw.js/releases/"
| downloadUrl | | Download server. Supports file systems too (for example file:///home/user/nwjs_mirror) |"https://nwjs.io/versions.json" \| "https://raw.githubusercontent.com/nwutils/nw-builder/main/src/util/osx.arm.versions.json"
| manifestUrl | | Versions manifest |string
| cacheDir | | Directory to cache NW binaries |boolean
| cache | | If true the existing cache is used. Otherwise it removes and redownloads it. |boolean
| ffmpeg | | If true the chromium ffmpeg is replaced by community version with proprietary codecs. |boolean
| nativeAddon | | If true download NW.js Node headers. |boolean` | Flag to enable/disable shasum checks. |
| shaSum |
- Use Node.js standard libraries whenever possible.
- Prefer to use syncronous APIs over modern APIs which have been introduced in later versions.
- npm trusted publishing is used for releases
- a package is released when a maintainer creates a release note for a specific version