ClojureScript wrapper for node-webkit Native UI API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
src/node_webkit
.gitignore
README.md
project.clj

README.md

node-webkit-cljs

Simple wrapper for node-webkit native APIs. Provides idiomatic approach for most use cases.

Status: many APIs (i.e. Shell, Clipboard, File dialogs) are missing and planned for next releases. Contribution is highly appreciated.

Add [node-webkit-cljs "0.1.4"] to lein :dependencies.

(ns myapp.core
  :require [node-webkit.core :as nw])

(nw/tray! {:title "My App"
           :icon "img/icon.png"
           :menu (nw/menu [{:label "Show..." :click #(.show (nw/window))}
                           {:type "separator"}
                           {:label "Quit" :click nw/quit}])})

(.on (nw/window) "close" #(.hide (nw/window)))

; and so on

Note that namespace (node-webkit) differs from project name (node-webkit-cljs).

See example project

Documentation

API documentation

Official node-webkit Native UI API documentation.

Roadmap

  • Tests
  • Support all other APIs

License

Copyright © 2013 Ilia Ablamonov

Distributed under the Eclipse Public License, the same as Clojure.