
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@anglay/nw-sdk
Advanced tools
An installer for nw.js.
nw.js is an app runtime based on Chromium and io.js. For building desktop applications that will run on OSX, Windows and Linux.
Install locally to your project with: npm install nw and then in your package.json add a script:
{
"scripts": {
"start": "nw"
}
}
Now it will run your local project when you type npm start.
If your project is in another folder, add the path to the project "start": "nw path/to/app".
You could also call the binary directly with node_modules/.bin/nw instead of adding to your package.json.
You can also install globally with npm install nw -g and then in any project type nw to run the project. Installing locally is recommended though as each project can have its own dependent version of nw.js.
If you want a really quick example try this:
git clone https://github.com/zcbenz/nw-sample-apps && cd nw-sample-appsnpm initnpm install nw"node_modules/.bin/nw" file-explorerand now you should see a file explorer demo app.
There are a few (platform-specific) arguments you can pass to the nw executable to
customize your nw.js application:
--mac_plist <path-to-plist-file>: (OS X only) Copies the given file to Info.plist in the app
bundle. This lets you do things like change your app's name and point to a different icon.
--mac_icon <path-to-icns-file>: (OS X only) Copies the given .icns file to the Resources/ dir
in the app bundle. You will need to point to the file with a custom plist file as well (see
--mac_list)
NOTE: These options will keep the copied files in the app bundle for as long as the bundle is
on the filesystem (they're not deleted between app invocations). As a result, they're not
recommended if you installed nwjs globally using -g. Also note that
OS X caches these files,
so you may need to manually clear these cached files during development.
To install a specific version of nw.js use npm with the specific version: npm install nw@0.12.0
Please note: This npm package version tracks the version of nw.js that will be installed, with an additional build number that is used for revisions to the installer. As such
0.12.0-1and0.12.0-2will both installnw.js@0.12.0but the latter has newer changes to the installer.
You may use npm view nw versions to view the list of available versions.
nw.js has three build types: normal, sdk and nacl. To install a specific build type you may set npm config property nwjs_build_type, environment variable NWJS_BUILD_TYPE or pass command line option --nwjs_build_type:
npm install nwjs --nwjs_build_type=sdk
Setting option in .npmrc file (https://www.npmjs.org/doc/files/npmrc.html):
nwjs_build_type=sdk
Setting environment variable NWJS_BUILD_TYPE:
export NWJS_BUILD_TYPE=sdk
You can alternatively install sdk build by specifying -sdk suffix in version:
npm install nwjs@0.13.3-sdk
If you would like to programmatically retrieve the path to the nw.js binary use:
var findpath = require('nw').findpath;
var nwpath = findpath();
// nwpath will equal the path to the binary depending on your environment
The installer attempts to download binaries from the default location of http://dl.nwjs.io/v. You can override this by setting the npm config property nwjs_urlbase on the command line by passing the --nwjs_urlbase option:
npm install nwjs --nwjs_urlbase=http://my.own.location/somewhere
or adding it to your .npmrc file (https://www.npmjs.org/doc/files/npmrc.html):
nwjs_urlbase=http://my.own.location/somewhere
You can alternatively set an environment variable NWJS_URLBASE:
export NWJS_URLBASE=http://my.own.location/somewhere
The installer supports file:// URLs to retrieve files from the local filesystem:
export NWJS_URLBASE=file:///home/bilbo/my/own/mirror
If you are behind a proxy server you have to set an environment variable http_proxy with proxy servers url:
export http_proxy="http://username:password@myproxy.com:8080"
or
export http_proxy="http://myproxy.com:8080"
nw.js's code and this installer use the MIT license.
FAQs
A installer for nw.js
We found that @anglay/nw-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.