Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.26 KB

all.org

File metadata and controls

47 lines (34 loc) · 1.26 KB

This file is archived and only kept for reference - DO NOT edit

thi.ng/geom examples

This project contains a growing number (currently ~30) examples demonstrating usage patterns of various modules and core functionality:

Clojure examples

Clojurescript examples

REPL helpers

The following helpers are tangled to the file examples/repl.clj in the project’s babel directory (the build directory). To run all (Clojure) examples for a given module do this:

cd geom
./tangle-all.sh
cd babel
lein repl

# in the REPL...

(load-file "examples/repl.clj")
(run-all-in-dir "examples/<<module>>") ;; svg, viz etc.

The examples/repl.clj file contains the following function:

(defn run-all-in-dir
  "Loads (and executes) all .clj files in given directory."
  [dir]
  (doseq [f (filter #(.endsWith (.getName %) ".clj") (file-seq (java.io.File. dir)))]
    (load-file (.getAbsolutePath f))))