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 outputDirectory = "outsite/public/js/out/";
var devFile = "reagentdemo/core.js";
var devFile = "reagenttest/runtests.js";
var beep = "\u0007";

View File

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