diff --git a/src/site/fabricate/prototype/document/clojure.clj b/src/site/fabricate/prototype/source/clojure.clj similarity index 91% rename from src/site/fabricate/prototype/document/clojure.clj rename to src/site/fabricate/prototype/source/clojure.clj index 25f421a..02b49ba 100644 --- a/src/site/fabricate/prototype/document/clojure.clj +++ b/src/site/fabricate/prototype/source/clojure.clj @@ -1,4 +1,4 @@ -(ns site.fabricate.prototype.document.clojure +(ns site.fabricate.prototype.source.clojure "Fabricate namespace defining methods for turning Clojure namespaces into Hiccup documents" (:require [hiccup2.core :as hiccup] [rewrite-clj.parser :as parser] @@ -23,6 +23,7 @@ ;; server-side syntax highlighting (def form-map-schema + "Schema describing a simplified way of storing Clojure forms and their potential results." (m/schema [:map [:clojure/source {:description "Source of the expression as a string"} :string] @@ -36,6 +37,7 @@ {:description "Results of evaluation" :optional true} :any]])) (defn node->map + "Convert the given rewrite-clj node into a form map." [n m] (let [src-info (reduce-kv (fn [mm k v] (assoc mm (keyword "clojure.source" (name k)) v)) diff --git a/test/site/fabricate/prototype/document/clojure_test.clj b/test/site/fabricate/prototype/source/clojure_test.clj similarity index 90% rename from test/site/fabricate/prototype/document/clojure_test.clj rename to test/site/fabricate/prototype/source/clojure_test.clj index 1debddd..0ffefad 100644 --- a/test/site/fabricate/prototype/document/clojure_test.clj +++ b/test/site/fabricate/prototype/source/clojure_test.clj @@ -1,4 +1,4 @@ -(ns site.fabricate.prototype.document.clojure-test +(ns site.fabricate.prototype.source.clojure-test (:require [clojure.test :as t] [babashka.fs :as fs] [malli.core :as m]