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 outputDirectory = "outsite/public/js/out/";
|
||||
var devFile = "reagentdemo/core.js";
|
||||
var devFile = "reagenttest/runtests.js";
|
||||
|
||||
var beep = "\u0007";
|
||||
|
||||
|
|
|
@ -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"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue