Skip to content

Instantly share code, notes, and snippets.

@cark
Forked from anonymous/gist:7376057
Last active December 27, 2015 19:19
Show Gist options
  • Save cark/7376645 to your computer and use it in GitHub Desktop.
Save cark/7376645 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 alts!]])
(: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