Skip to content

Instantly share code, notes, and snippets.

@frankhale
Last active August 29, 2015 14:01
Show Gist options
  • Save frankhale/8fe873601fb4212cdc87 to your computer and use it in GitHub Desktop.
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.
(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))
@frankhale
Copy link
Author

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.

@frankhale
Copy link
Author

I've opened an issue in lieu of somewhere else to ask on the atom-shell repo:

electron/electron#312

@frankhale
Copy link
Author

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