Make tests run in node in debug mode as well

And simplify site generation
This commit is contained in:
Dan Holmsand 2015-08-20 09:54:15 +02:00
parent 5d24b9be65
commit 6b9aeffadd
2 changed files with 5 additions and 12 deletions

View File

@ -3,7 +3,7 @@ var cljsLoad = require("./cljs-load");
var srcFile = "outsite/public/js/main.js"; var srcFile = "outsite/public/js/main.js";
var outputDirectory = "outsite/public/js/out/"; var outputDirectory = "outsite/public/js/out/";
var devFile = "reagentdemo/core.js"; var devFile = "reagenttest/runtests.js";
var beep = "\u0007"; var beep = "\u0007";

View File

@ -234,17 +234,10 @@
(log "Generating site") (log "Generating site")
(swap! config merge (js->clj opts :keywordize-keys true)) (swap! config merge (js->clj opts :keywordize-keys true))
(let [dir (:site-dir @config) (let [dir (:site-dir @config)
written (r/atom #{}) timestamp (str "?" (.' js/Date now))]
timestamp (str "?" (.' js/Date now)) (doseq [f (keys (:page-map @config))]
one-page (fn [] (first (filter (write-file (path-join dir f)
(fn [x] (nil? (@written x))) (gen-page f timestamp)))
(keys (:page-map @config)))))]
(loop [f (one-page)]
(when f
(swap! written conj f)
(write-file (path-join dir f)
(gen-page f timestamp))
(recur (one-page))))
(write-resources dir)) (write-resources dir))
(log "Wrote site")) (log "Wrote site"))