Let's you build your node-webkit apps for mac, win and linux with grunt. It will download the prebuilt binaries for a specify version, unpacks it, creates a release folder, create the app.nw file for a specified directory and copys the app.nw file where it belongs.
This plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-node-webkit-builder --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-node-webkit-builder');
Type: String
Default value: '0.8.4'
The version of node-webkit you want to use. Here is a list of all available releases
Type: String
Default value: null
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.
Type: String
Default value: null
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.
Type: String
Default value: null
This is where the prebuilt binaries and the releases are saved.
Type: Boolean
Default value: false
This will delete everything in your build_dir
directory, including the cached downloaded prebuilt binaries
Type: Boolean
Default Value: false
Enables the creation of release directories named with a timestamp instead of the app_version.
Type: Boolean
Default value: true
Do you want to download and build a windows version
Type: Boolean
Default value: true
Do you want to download and build a mac version
Type: Boolean
Default value: false
Do you want to download and build a linux32 version
Type: Boolean
Default value: false
Do you want to download and build a linux64 version
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
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
Type: Boolean
Default value: false
This will keep the zipped .nw file in the releases folder
Type: String
Default value: https://s3.amazonaws.com/node-webkit/
The URL where the prebuilt binaries are. Only change this if you know what you are doing
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.
grunt.initConfig({
nodewebkit: {
options: {
build_dir: './webkitbuilds', // Where the build version of my node-webkit app is saved
mac: true, // We want to build it for mac
win: true, // We want to build it for win
linux32: false, // We don't need linux32
linux64: false // We don't need linux64
},
src: ['./example/public/**/*'] // Your node-webkit app
},
})
- Port the logic into a separate npm module and make a wrapper for grunt/gulp/what-ever-the-next-thing-is
- 2013-09-19 Removed config merging (but kept the lookup for version number and name), added keep_nw option, fixed various small bugs.
- 2013-09-09 fixed accidential deletion of nw.exe on windows builds, adding several improvements, opt in for timestamped builds, using version and name from package.json to name the build product and build dir, renamed download directory to
cache
, added merge from package.json options for nodewebkit (no need to add configuration to Gruntfile, but stays optional) - 2013-08-20 fix for the unzip lib
- 2013-08-13 initial release