Created
November 30, 2014 20:05
-
-
Save zaiste/350b02f642ee589a9f83 to your computer and use it in GitHub Desktop.
ClojureScript structure
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 zaba.core) | |
(enable-console-print!) | |
(defn on-click [] | |
(js/alert "Hello, World!")) | |
(.addEventListener (.getElementById js/document "button") | |
"click" on-click) |
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"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.min.css" /> | |
</head> | |
<body> | |
<a href='#' id='button' class='button'>Click me</a> | |
<script src="js/out/goog/base.js" type="text/javascript"></script> | |
<script src="js/zaba.js" type="text/javascript"></script> | |
<script type="text/javascript">goog.require("zaba.core");</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 zaba "0.1.0-SNAPSHOT" | |
:dependencies [[org.clojure/clojure "1.6.0"] | |
[org.clojure/clojurescript "0.0-2371"]] | |
:plugins [[lein-cljsbuild "1.0.4-SNAPSHOT"]] | |
:cljsbuild {:builds [{:id "dev" | |
:source-paths ["src/cljs"] | |
:compiler {:output-to "resources/public/js/zaba.js" | |
:output-dir "resources/public/js/out" | |
:optimizations :none | |
:source-map true}}]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment