Created
August 8, 2011 19:41
-
-
Save mjg123/1132536 to your computer and use it in GitHub Desktop.
core clojurescript
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 game.core | |
(:require [goog.graphics :as gfx] | |
[goog.events :as events] | |
[goog.events.KeyCodes :as key-codes] | |
[goog.events.KeyHandler :as key-handler] | |
[game.ui :as ui]) | |
; core game logic | |
(ui/foo) |
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 game.ui | |
(:require [goog.dom :as dom]) | |
(defn foo [] | |
; whatever... | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To be clear, I am building by using the cljs repl in the same directory as these files, and issuing:
(time (cljsc/build "core.cljs" {:optimizations :advanced :output-to "game.js"}))
I get the error
IllegalArgumentException No implementation of method: :-compile of protocol: #'cljs.closure/Compilable found for class: nil clojure.core/-cache-protocol-fn (core_deftype.clj:494)
This does work fine if (defn foo...) is in the core.cljs file and I don't try to require anything except goog.*