Skip to content

Instantly share code, notes, and snippets.

Created November 8, 2013 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/7376057 to your computer and use it in GitHub Desktop.
Save anonymous/7376057 to your computer and use it in GitHub Desktop.
;; project.clj
(defproject bleh "0.0.1-SNAPSHOT"
:decription "bleh"
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-2024"]
[org.clojure/core.async "0.1.256.0-1bf8cf-alpha"]]
:plugins [[lein-cljsbuild "0.3.3"]]
:cljsbuild {:builds [{:source-paths ["src-cljs"]
:compiler {:output-to "main.js"
:optimizations :whitespace
:pretty-print true
:source-map "main.js.map"
;:target :nodejs
}}
{:source-paths ["src-cljs"]
:compiler {:output-to "main-min.js"
:optimizations :advanced
:pretty-print false
:source-map "main-min.js.map"
;:target :nodejs
}}]}
)
;; main.cljs
(ns cark.core
(:require [cljs.core.async :as ca :refer [chan put! <! timeout]])
(:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
(defn ^:export main []
(go (alts! [(timeout 100) (timeout 1000)])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment