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 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)) |
I've opened an issue in lieu of somewhere else to ask on the atom-shell repo:
This is still not resolved. I'll post back once it is because I am seriously interested in using Clojurescript with atom-shell!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've taken the hello, world atom-shell app and rewrote the main.js in Clojurescript. The app is reported as being invalid and nothing shows up in the dev tools so I cannot figure out how to debug what is going on.