Skip to content

Instantly share code, notes, and snippets.

@thheller
Created July 26, 2014 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thheller/6c3ad4c880b035921ce6 to your computer and use it in GitHub Desktop.
Save thheller/6c3ad4c880b035921ce6 to your computer and use it in GitHub Desktop.
timestamping the output files
(defn add-module-build-times [state]
(let [now (System/currentTimeMillis)]
(reduce (fn [state name]
(assoc-in state [:modules name :js-name] (str now "-" (clojure.core/name name) ".js")))
state
(keys (:modules state)))))
;; then in the build step
(-> state
(define-modules)
(add-module-build-times)
(cljs/step-compile-modules)
(cljs/closure-optimize)
(cljs/flush-modules-to-disk))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment