Node webkit-meetup

8
node-webkit OpenWeb as a packaged app [email protected]

Transcript of Node webkit-meetup

node-webkitOpenWeb as a packaged app

[email protected]

node-webkit● made by intel in 2011● Chromium + node.js● html + css + js ➡ linux, OS X, windows

node-webkit > browser

● user files● low level networking● frameless windows● node.js functions live in the rendering

thread● all script operations as user gesture● global access for local pages

layers

node-webkit app

node.js modulesjade, level, ...

web librariesjQuery, angular, ...

node.js nativecrypto, fs, ...

DOMwindow, GUM, ...

structureapp

package.jsonindex.htmljscssnode_modules

package.json{ "name": "countdown", "main": "index.html", "window": {

"frame": false,"width": 1000,"height": 125,

"title": "final countdown","icon": "link.png","toolbar": true,"position": "mouse","min_width": 400,"min_height": 200,"max_width": 800,"max_height": 600

}, "dependencies": { }}

build/start1. download node-webkit binary2. zip all of your assets

zip -r ../app.nw *

3. startnode-webkit app.nw

4. create a bundle:cat /usr/bin/nw app.nw > app && chmod +x app

Thanks!

Questions?