Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to use slurp from ClojureScript
(ns foo.core
(:refer-clojure :exclude [slurp]))
(defmacro slurp [file]
(clojure.core/slurp file))
;; In CLJS
(ns bar.core
(:require [foo.core :include-macros true :refer [slurp]]))
;; This is possible because we can evaluate *Clojure* code at compile time.
(def project-clj
(slurp "project.clj"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.