Coder Social home page Coder Social logo

joseph-hurtado / grunt-node-webkit-builder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nwjs/grunt-nw-builder

0.0 1.0 0.0 424 KB

Let 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.

License: MIT License

grunt-node-webkit-builder's Introduction

grunt-node-webkit-builder

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.

Getting Started

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');

The "nodewebkit" task

Options

options.version

Type: String Default value: '0.9.2'

The version of node-webkit you want to use. Here is a list of all available releases

options.app_name

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.

options.app_version

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.

options.build_dir

Type: String Default value: null

This is where the prebuilt binaries and the releases are saved.

options.force_download

Type: Boolean Default value: false

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

options.timestamped_builds

Type: Boolean Default Value: false

Enables the creation of release directories named with a timestamp instead of the app_version.

options.win

Type: Boolean Default value: true

Do you want to download and build a windows version

options.mac

Type: Boolean Default value: true

Do you want to download and build a mac version

options.linux32

Type: Boolean Default value: false

Do you want to download and build a linux32 version

options.linux64

Type: Boolean Default value: false

Do you want to download and build a linux64 version

options.credits

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.mac_icns

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.keep_nw

Type: Boolean Default value: false

This will keep the zipped .nw file in the releases folder

options.download_url

Type: String Default value: http://dl.node-webkit.org/

The URL where the prebuilt binaries are. Only change this if you know what you are doing

options.zip

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.

Usage Examples

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
  },
})

To Do:

  • Port the logic into a separate npm module and make a wrapper for grunt/gulp/what-ever-the-next-thing-is

Release History

  • 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

grunt-node-webkit-builder's People

Contributors

steffenmllr avatar wilkerlucio avatar autarc avatar nemurimasu avatar vladikoff avatar gion avatar bored-engineer avatar rogerwang avatar rbrcurtis avatar adametry avatar rawcreative avatar shinnn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.