From ce9afb470cc6ff75c6cf71dd919e4862164518db Mon Sep 17 00:00:00 2001 From: Dan Holmsand Date: Sat, 18 Jan 2014 11:43:56 +0100 Subject: [PATCH] Rename demoutil --- demo/demo.cljs | 1 - demo/reagentdemo/common.cljs | 11 +++++------ demo/reagentdemo/intro.cljs | 2 +- demo/{demoutil.clj => reagentdemo/syntax.clj} | 2 +- demo/{demoutil.cljs => reagentdemo/syntax.cljs} | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) rename demo/{demoutil.clj => reagentdemo/syntax.clj} (81%) rename demo/{demoutil.cljs => reagentdemo/syntax.cljs} (99%) diff --git a/demo/demo.cljs b/demo/demo.cljs index f04cd57..7cdf7f0 100644 --- a/demo/demo.cljs +++ b/demo/demo.cljs @@ -4,7 +4,6 @@ [reagentdemo.page :as rpage] [reagentdemo.news :as news] [reagentdemo.intro :as intro] - [demoutil :as demoutil :refer-macros [get-source]] [reagentdemo.common :as common :refer [demo-component]] [reagent.debug :refer-macros [dbg println]])) diff --git a/demo/reagentdemo/common.cljs b/demo/reagentdemo/common.cljs index fb0afac..7d2cde6 100644 --- a/demo/reagentdemo/common.cljs +++ b/demo/reagentdemo/common.cljs @@ -1,10 +1,10 @@ (ns reagentdemo.common (:require [reagent.core :as reagent :refer [atom]] - [demoutil :as demoutil :refer-macros [get-source]] + [reagent.debug :refer-macros [dbg println]] [clojure.string :as string] - [reagent.debug :refer-macros [dbg println]])) + [reagentdemo.syntax :as syntax])) -(def syntaxify (memoize demoutil/syntaxify)) +(def syntaxify (memoize syntax/syntaxify)) (defn src-parts [src] (string/split src #"\n(?=[(])")) @@ -31,8 +31,7 @@ [:pre (-> funmap (src-for-names defs) syntaxify)]) (defn demo-component [{:keys [comp src complete]}] - (let [colored src - showing (atom true)] + (let [showing (atom true)] (fn [] [:div (when comp @@ -49,4 +48,4 @@ (when @showing [:div.demo-source [:h3.demo-heading "Source"] - colored])]))) + src])]))) diff --git a/demo/reagentdemo/intro.cljs b/demo/reagentdemo/intro.cljs index 6c00039..351e773 100644 --- a/demo/reagentdemo/intro.cljs +++ b/demo/reagentdemo/intro.cljs @@ -3,7 +3,7 @@ (:require [reagent.core :as reagent :refer [atom]] [reagent.debug :refer-macros [dbg println]] [clojure.string :as string] - [demoutil :as demoutil :refer-macros [get-source]] + [reagentdemo.syntax :refer-macros [get-source]] [reagentdemo.common :as common :refer [demo-component]])) (defn simple-component [] diff --git a/demo/demoutil.clj b/demo/reagentdemo/syntax.clj similarity index 81% rename from demo/demoutil.clj rename to demo/reagentdemo/syntax.clj index d015b3c..9ff8672 100644 --- a/demo/demoutil.clj +++ b/demo/reagentdemo/syntax.clj @@ -1,4 +1,4 @@ -(ns demoutil +(ns reagentdemo.syntax (:require [clojure.java.io :as io])) (defmacro get-source [srcfile] diff --git a/demo/demoutil.cljs b/demo/reagentdemo/syntax.cljs similarity index 99% rename from demo/demoutil.cljs rename to demo/reagentdemo/syntax.cljs index 1607717..48eb0a9 100644 --- a/demo/demoutil.cljs +++ b/demo/reagentdemo/syntax.cljs @@ -1,4 +1,4 @@ -(ns demoutil +(ns reagentdemo.syntax (:require [clojure.string :as string])) (def builtins #{"def" "defn" "ns" "atom" "let" "if" "when"