npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nw-global-build

v1.0.7

Published

Tool to package nw.js applications with a launcher which will allow the application to use a system-wide installed version of the nw.js runtime.

Downloads

9

Readme

nw-global-build

This is the command-line tool to automate the build of installer (for Windows) and packages (for Linux) of nw.js applications that use a system-wide installation of the nw runtime files. For more information about this packaging method for nw.js apps, please see the README file at the root of the nw.js-global-install repository.

Features

This tool can build Windows installers based on NSIS and .deb and .rpm packages for Linux in i386 and x86_64 architectures.

Requirements

This tool is written in Javascript so you obviously need node and npm. To build a Windows installer you need makensis. On Windows, you can get it by installing NSIS and then adding it's install directory (default is C:\Program Files (x86)\NSIS) to your PATH environment variable. On Linux, you can install the nsis package from your distribution's repositories (for example sudo apt-get install nsis on Ubuntu and Debian-like distros). To build Linux packages you need fpm, a tool written in Ruby that allows to build various types of packages. You can actually build Linux packages only on a Linux machine or maybe with Cygwin. To install fpm, follow the instructions here (basically, you need to install Ruby with C headers and then install the fpm gem). For RPM packages fpm also needs rpmbuild; if you are on a distro which isn't based on RPM packages, you probably need to install rpm (for example sudo apt-get install rpm on Ubuntu and similar).

Usage

  • Step 0: make sure you have installed the dependencies for the package types you want to build (see the previous section).
  • Step 1: install this tool with npm install -g nw-global-build (you may need sudo depending on your node.js installation).
  • Step 2: navigate (cd) to the root directory of the nw.js application you want to package. The root is where the package.json is located. Make sure you have added the nwjsmanager section with the version filter in package.json as explained here.
  • Step 3: run nw-global-build init. This will put a nw-global.json file in the directory, which you can (and should) edit to customize the build process.
  • Step 4: open nw-global.json with your editor. Read the comments to understand what each field means, and edit the fields according to your needs.
  • Step 5: run nw-global-build update. If you had to use sudo at Step 1, you'll need it here too. This builds a cache of the binaries required during the build process (nwjsmanager and applauncher for the various platforms) in a subdirectory of the nw-global-build npm module (since it's installed globally, this is the reason you may need sudo).
  • Step 6: run nw-global-build build to actually build the packages. This will build the types listed in the default-output field of nw-global.json, but can be overridden by listing the package types you want to be built on the command line. For example, nw-global-build build win deb64 builds a Windows installer and an x86_64 package for Debian-like Linux distributions.

Repeat Step 6 every time you want to rebuild the packages. If you get errors saying that binary hashes doesn't match, it means that nwjsmanager and/or applauncher have been updated, but they can't be downloaded to the cache directory due to missing permissions. To solve the issue, rebuild the binary cache with sudo nw-global-build update.