Created
July 2, 2012 00:16
-
-
Save olivergeorge/3030159 to your computer and use it in GitHub Desktop.
Sample code to demonstrate error when using cljs-binding with compiler optimisations
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
Uncaught Error: No protocol method ISeqable.-seq defined for type function: function () {cljsbinding.boot()} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var CLOSURE_NO_DEPS = true; | |
</script> | |
<script src="test.min.js" type="text/javascript"></script> | |
<script>$(function() {cljsbinding.boot()})</script> | |
</body> | |
</html> |
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
(defproject test "1.0.0-SNAPSHOT" | |
:description "Test compiling with optimisations for production" | |
:dependencies [[org.clojure/clojure "1.3.0"] | |
[fluentsoftware/cljs-binding "1.0.0-SNAPSHOT"]] | |
:plugins [[lein-cljsbuild "0.2.1"]] | |
:cljsbuild { | |
:builds { | |
:prod | |
{:source-path "src-cljs" | |
:compiler {:output-to "test.min.js" | |
:optimizations :advanced | |
:pretty-print false}}}}) |
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 test | |
(:require [cljsbinding :as binding]) | |
) | |
(js/console.log "hello from test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment