Skip to content

Instantly share code, notes, and snippets.

@mudphone
Last active November 28, 2015 22:00
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 mudphone/84952982ea86da1cecc3 to your computer and use it in GitHub Desktop.
Save mudphone/84952982ea86da1cecc3 to your computer and use it in GitHub Desktop.
Om-Tutorial with Figwheel in Emacs with CIDER
;; In script/figwheel.clj
;; Can be run from project root:
;; $ rlwrap lein run -m clojure.main script/figwheel.clj
;;
;; Or, from a CLJS file buffer:
;; M-x cider-jack-in
;; then eval these forms:
;; M-x cider-eval-buffer
(require
'[figwheel-sidecar.repl :as r]
'[figwheel-sidecar.repl-api :as ra])
(ra/start-figwheel!
{:figwheel-options {}
:build-ids ["dev"]
:all-builds
[{:id "dev"
:figwheel true
:source-paths ["src"]
:compiler {:main 'om-tutorial.core
:asset-path "js"
:output-to "resources/public/js/main.js"
:output-dir "resources/public/js"
:verbose true}}]})
(ra/cljs-repl)
;; Not sure if this is strictly necessary, but for the record...
;; in ~/.lein/profiles.clj
{:repl {:plugins [[cider/cider-nrepl "0.9.1"]]}}
(defproject om-tutorial "0.1.0-SNAPSHOT"
:description "om tutorial"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
[org.omcljs/om "1.0.0-alpha22"]
[figwheel-sidecar "0.5.0-SNAPSHOT" :scope "test"]]
:profiles {:dev
{:dependencies [[com.cemerick/piggieback "0.2.1"]]}}
:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment