mirror of https://github.com/status-im/reagent.git
Make tests run in node in debug mode as well
And simplify site generation
This commit is contained in:
parent
5d24b9be65
commit
6b9aeffadd
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue