Skip to content

Instantly share code, notes, and snippets.

@MarcoPolo
Created September 20, 2013 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoPolo/6632280 to your computer and use it in GitHub Desktop.
Save MarcoPolo/6632280 to your computer and use it in GitHub Desktop.
Problem with clj->js specifically (and probably more stuff I'm not testing) after the first compilation
(ns test-cljs.core)
(def ^:export t (clj->js {:command "function"}))
(.log js/console t)
(defproject test-cljs "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-1889"] ]
:plugins [[lein-cljsbuild "0.3.2"]]
:cljsbuild
{:builds
[{:id "advanced"
:source-paths ["src/test_cljs"]
:compiler {:optimizations :advanced
:pretty-print false
:output-to "main.js"
:source-map "main.js.map"
}}]})
@MarcoPolo
Copy link
Author

The first compilation yields the expected: {command: "function"}
Subsequent compilations yield: {command: null}

lein cljsbuild clean was run before compiling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment