{"id":19070410,"url":"https://github.com/nwjs/npm-installer","last_synced_at":"2025-04-15T03:51:04.454Z","repository":{"id":25887398,"uuid":"29327806","full_name":"nwjs/npm-installer","owner":"nwjs","description":"npm installer for NW.js","archived":false,"fork":false,"pushed_at":"2025-04-06T07:37:24.000Z","size":862,"stargazers_count":162,"open_issues_count":3,"forks_count":51,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-07T08:02:41.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-16T01:56:46.000Z","updated_at":"2025-04-06T07:36:08.000Z","dependencies_parsed_at":"2023-10-16T14:54:06.575Z","dependency_job_id":"12104e25-55c2-4a87-8671-27a4a72cde34","html_url":"https://github.com/nwjs/npm-installer","commit_stats":{"total_commits":839,"total_committers":29,"mean_commits":28.93103448275862,"dds":0.6162097735399286,"last_synced_commit":"2d11bc7c998ff2ede924cb41530feef771789c52"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwjs%2Fnpm-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwjs%2Fnpm-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwjs%2Fnpm-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwjs%2Fnpm-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwjs","download_url":"https://codeload.github.com/nwjs/npm-installer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003944,"owners_count":21196794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T01:18:32.626Z","updated_at":"2025-04-15T03:51:04.437Z","avatar_url":"https://github.com/nwjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nw\n\nAn npm installer for [NW.js](https://nwjs.io).\n\n[![npm](https://img.shields.io/npm/v/nw)](https://www.npmjs.com/package/nw)\n\n## Install\n\nPlease go through the [CHANGELOG](https://github.com/nwjs/npm-installer/blob/main/CHANGELOG.md) carefully and choose the appropriate version. Bug fixes and feature updates are pushed to the repo periodically.\n\n### Latest version globally\n\n```shell\nnpm install -g nw\n```\n\nYou might run into issues installing globally. [Learn how to fix this](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally)\n\n### Latest version of normal build flavor:\n\n```shell\nnpm install --save-dev nw\n```\n\n### Specific version with changes to installer:\n\n```shell\nnpm install --save-dev nw@0.94.1-1\n```\n\n\u003e You may use `npm view nw versions` to view the list of available versions.\n\nFor more options, see the Options table below.\n\n## Usage\n\nAdd a script in your `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"start\": \"nw /path/to/app\"\n  }\n}\n```\n\nExecuting `npm start` runs the NW.js app. Omitting the file path makes NW.js check for valid project in current working directory. You can also call `nw` directly from `./node_modules/.bin/nw`.\n\n## APIs\n\n### Find path to the NW.js binary:\n\n``` js\nimport { findpath } from 'nw';\nlet path = await findpath();\n```\n\n## Find the path to the chromedriver binary\n\n``` js\nimport { findpath } from 'nw';\nlet path = await findpath('chromedriver', { flavor: 'sdk' });\n```\n\n## Download specific versions independant of installer version\n\n```js\nimport { get } from 'nw';\n\nawait get({\n  version: '0.14.7'\n  // other options\n});\n```\n\n## Options:\n\n| Name | Type    | Default   | Description | CLI Usage | .npmrc Usage | .env Usage | Module Usage |\n| ---- | ------- | --------- | ----------- | --------- | ------------ | ---------- | ------------ |\n| version | `string \\| \"latest\" \\| \"stable\"` | `\"latest\"` | Runtime version | `npm install --save-dev nw` | `` | `` | `get({ version: \"latest\" })` |\n| flavor | `\"normal\" \\| \"sdk\"` | `\"normal\"` | Runtime flavor | `npm install --save-dev nw@sdk` | `nwjs_build_type=sdk` | `export NWJS_BUILD_TYPE=sdk` | `get({ flavor: \"sdk\" })` |\n| platform | `\"linux\" \\| \"osx\" \\| \"win\"` | `\u003cdefaults to host platform\u003e` | Host platform | `npm install --save-dev --nwjs-platform nw` | `nwjs_platform=linux` | `NWJS_PLATFORM=linux` | `get({ platform: \"linux\" })` |\n| arch | `\"ia32\" \\| \"x64\" \\| \"arm64\"` | `\u003cdefaults to architecture platform\u003e` | Host architecture | `npm install --save-dev --nwjs-arch nw` | `nwjs_arch=x64` | `NWJS_ARCH=x64` | `get({ arch: \"x64\"})` |\n| downloadUrl | `\"https://dl.nwjs.io\" \\| \"https://npm.taobao.org/mirrors/nwjs\" \\| https://npmmirror.com/mirrors/nwjs \\| \"https://github.com/corwin-of-amber/nw.js/releases/ nw\"` | `\"https://dl.nwjs.io\"` | Download server (https and file system is supported, for eg `file:///home/user/nwjs_cache`) | `npm install --save-dev --nwjs-urlbase=https://dl.nwjs.io` | `nwjs_urlbase=https://dl.nwjs.io` | `NWJS_URLBASE=https://dl.nwjs.io` | `get({ downloadUrl: \"https://dl.nwjs.io\"})` |\n| cacheDir | `string` | `./node_modules/nw` | Directory to cache NW binaries | `npm install --save-dev --nwjs-cache-dir ./cache nw` | `nwjs_cache_dir=./cache` | `NWJS_CACHE_DIR=./cache` | `get({ cacheDir: \"./cache\" })` |\n| sirDir | `string` | `.` | File path to NW.js project | `nw .` | `` | `` | `get({ srcDir: \".\" })` |\n| cache | `boolean` | `true`| If true the existing cache is used. Otherwise it removes and redownloads it. | `npm install --save-dev --nwjs-cache=true nw` | `nwjs_cache=true` | `NWJS_CACHE=true` | `get({ cache: true })` |\n| ffmpeg | `boolean` | `false`| If true the chromium ffmpeg is replaced by [community version](https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt) with proprietary codecs. | `npm install --save-dev --nwjs-ffmpeg=true nw` | `nwjs_ffmpeg=true` | `NWJS_FFMPEG=true` | `get({ ffmpeg: true })` |\n| nodeAddon | `false \\| \"gyp\"` | `false` | Download Node headers | `npm install --save-dev --nwjs-native-addon=true nw` | `nwjs_native_addon=true` | `NWJS_NATIVE_ADDON=true` | `get({ nativeAddon: true })` |\n| unref | `boolean` | `false` | [Prevent the parent process from waiting for a given subprocess](https://nodejs.org/api/child_process.html#subprocessunref). This is useful if you're using `nw` package to call the executable and want to prevent zombie processes eating up memory. | `npm install --save-dev --nwjs-unref=true nw` | `nwjs_unref=true` | `NWJS_UNREF=true` | `get({ unref: true })` |\nshaSum | `boolean` | `true` | If true, then shasums are verified. Otherwise, it is ignored. | `npm install --save-dev --nwjs-shasum=true nw` | `nwjs_shasum=true` | `NWJS_SHASUM=true` | `get({ shaSum: true })` |\n\n\u003e Note: While using the CLI interface, /path/to/project refers to options.srcDir in the JavaScript API or JSON object.\n\n## License\n\n[NW.js](https://github.com/nwjs/nw.js)'s code and this installer use the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwjs%2Fnpm-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwjs%2Fnpm-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwjs%2Fnpm-installer/lists"}