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

kolodny-node-webkit-builder

v0.1.6

Published

node-webkit-builder

Downloads

9

Readme

node-webkit-builder NPM version Build Status Dependency Status

NPM

Lets you build your node-webkit apps for mac, win and linux via cli. It will download the prebuilt binaries for a newest version, unpacks it, creates a release folder, create the app.nw file for a specified directory and copies the app.nw file where it belongs.

Installation

Local
npm install node-webkit-builder --save-dev
Global
npm install node-webkit-builder -g
Grunt and Gulp Plugins

Yes, there is also a Grunt Plugin. For Gulp, just use the module :)

Usage

Usage: nwbuild [options] [path]

Options:
  -p, --platforms      Platforms to build, comma-sperated, can be: win,osx,linux32,linux64   [default: "osx,win"]
  -v, --version        The nw version, eg. 0.8.4                                             [default: "latest"]
  -r, --run            Runs node-webkit for the current platform                             [default: false]  
  -o, --buildDir       The build folder                                                      [default: "./build"]
  -f, --forceDownload  Force download of node-webkit                                         [default: false]
  --quiet              Disables logging                                                      [default: false]

Run node-webkit

During development you can run node-webkit with nwbuild -r path/to/your/younwapp/

Or use the module:

var NwBuilder = require('node-webkit-builder');
var nw = new NwBuilder({
    files: './path/to/nwfiles/**/**', // use the glob format
    platforms: ['win','osx']
});

// Log stuff you want
nw.on('log',  console.log);

// Build returns a promise
nw.build().then(function () {
   console.log('all done!');
}).catch(function (error) {
    console.error(error);
});

// And supports callbacks
nw.build(function(err) {
    if(err) console.log(err);
})

Options

options.files Required

Type: String or Array Default value: null

The path to your node webkit app. It supports simple-glob so you can do stuff like ['foo/*.js', '!foo/bar.js', 'foo/bar.js'].

options.version

Type: String Default value: 'latest'

The version of node-webkit you want to use. Per default it looks up the latest version. Here is a list of all available releases

options.platforms

Type: Array
Default value: ['win', 'osx']

The platforms you want to build. Can be ['win', 'osx', 'linux32', 'linux64']

options.appName

Type: String
Default value: false

The Name of your node-webkit app. If this value is set to null, it will autodetect the name form your projects package.json. This will be used to generate a plist file for mac.

options.appVersion

Type: String
Default value: false

The version of your node-webkit app. If this value is set to null, it will autodetect the version form your projects package.json. This will be used to generate a plist file for mac.

options.buildDir

Type: String
Default value: ./build

This is where the releases are saved.

options.cacheDir

Type: String
Default value: ./cache

This is where the cached node-webkit downloads are

options.buildType

Type: String or function Default value: default

How you want to save your build.

  • default [appName]
  • versioned [appName] -v[appVersion]
  • timestamped [appName] - [timestamp];
  • A function with options as scope (e.g function () {return this.appVersion;} )

options.forceDownload

Type: Boolean
Default value: false

This will delete everything in your build_dir directory, including the cached downloaded prebuilt binaries

options.macCredits

Type: String
Default value: false

MAC ONLY: The path to your credits.html file. If your don't provide your own it will use the one provided by node-webkit

options.macIcns

Type: String
Default value: false

MAC ONLY: The path to your ICNS icon file. If your don't provide your own it will use the one provided by node-webkit

options.macZip

Type: Boolean
Default value: false

MAC ONLY: Use a app.nw folder instead of ZIP file, this significantly improves the startup speed of applications on mac, since no decompressing is needed. Builds on other platforms will still use ZIP files.

options.macPlist

Type: String
Default value: false

MAC ONLY: if you supply a string to a Plist file it will use it. Otherwise it will generate something usefull from your package.json

options.winIco

Type: String
Default value: null

WINDOWS ONLY: The path to your ICO icon file. If your don't provide your own it will use the one provided by node-webkit. If you are building on MAC or LINUX you must have Wine installed to use this option.

To Do:

  • Test it on Linux and Windows

Release History

  • 2014-08-19 0.1.2 adds a progress bar to downloads, fixes downloading through a proxy, fixed winIco, bug fixes
  • 2014-08-01 0.1.0 use app filename for generated executables, optimized version checking, (known issue: winIco on windows)
  • 2014-07-31 0.0.4 fixed compatibility with nodewebkit 0.10.0
  • 2014-04-20 Added run option, bug fixes
  • 2014-04-13 Preview Release

License

MIT License