Code Monkey home page Code Monkey logo

nodewebkit's Introduction

nodewebkit Build Status

An installer for node-webkit.

node-webkit is an app runtime based on Chromium and node.js. For building desktop applications that will run on OSX, Windows and Linux.

NPM

ATTENTION

node-webkit was renamed to nw.js as of version 0.12.0.
The new and official installer for nw.js is now npm install nw and the repo is located at github.com/nwjs/npm-installer

All future releases >= 0.12.0 will be released through nw.

usage

Install locally to your project with: npm install nodewebkit and then in your package.json add a script:

{
  "scripts": {
    "start": "nodewebkit"
  }
}

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": "nodewebkit path/to/app".

You could also call the binary directly with node_modules/.bin/nodewebkit instead of adding to your package.json.

global

You can also install globally with npm install nodewebkit -g and then in any project type nodewebkit to run the project. Installing locally is recommended though as each project can have its own dependent version of node-webkit.

example

If you want a really quick example try this:

  1. git clone https://github.com/zcbenz/nw-sample-apps && cd nw-sample-apps
  2. npm install nodewebkit
  3. "node_modules/.bin/nodewebkit" file-explorer

and now you should see a file explorer demo app.

command line options

There are a few (platform-specific) arguments you can pass to the nodewebkit executable to customize your node-webkit 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 nodewebkit globally using -g. Also note that OS X caches these files, so you may need to manually clear these cached files during development.

install a specific version of node-webkit

To install a spcific version of node-webkit use npm with the specific version: npm install [email protected]

Please note: This npm package version tracks the version of node-webkit that will be installed, with an additional build number that is used for revisions to the installer. As such 0.9.2-1 and 0.9.2-2 will both install [email protected] but the latter has newer changes to the installer.

You may use npm view nodewwebkit versions to view the list of available versions.

finding the path to the node-webkit binary

If you would like to programmatically retrieve the path to the node-webkit binary use:

var findpath = require('nodewebkit').findpath;
var nwpath = findpath();
// nwpath will equal the path to the binary depending on your environment

using a proxy with or without authentication

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:[email protected]:8080"

or

export http_proxy="http://myproxy.com:8080"

license

node-webkit's code and this installer use the MIT license.

nodewebkit's People

Contributors

adam-lynch avatar af avatar ayapi avatar fweinb avatar lostfictions avatar max-mapper avatar merqlove avatar mithgol avatar seeekr avatar shama avatar ssilence avatar

Watchers

 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.