Last active
August 29, 2015 14:01
-
-
Save frankhale/8fe873601fb4212cdc87 to your computer and use it in GitHub Desktop.
My first attempt to port the main.js of the Hello, World atom-shell application to Clojurescript. This does not currently work because atom-shell thinks my application is invalid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns main.core) | |
(def app (js/require "app")) | |
(def browser-window (js/require "browser-window")) | |
(def crash-reporter (js/require "crash-reporter")) | |
(def main-window (atom nil)) | |
(defn init-browser [] | |
(reset! main-window (browser-window. (clj->js {:width 800 :height 600}))) | |
(.loadUrl @main-window (str "file://" js/__dirname "/index.html")) | |
(.on @main-window "closed" #(reset! main-window nil))) | |
(.start crash-reporter) | |
(.on app "window-all-closed" #(when-not (= js/process.platform "darwin") (.quit app))) | |
(.on app "ready" #(init-browser)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is still not resolved. I'll post back once it is because I am seriously interested in using Clojurescript with atom-shell!