Created
February 16, 2016 16:23
-
-
Save mobileink/67cefbe1a3ed5f32d2ad to your computer and use it in GitHub Desktop.
copy assets task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(core/deftask assets | |
"copy assets to build-dir" | |
[v verbose bool "Print trace messages"] | |
(core/with-pre-wrap [fs] | |
(let [tgt (core/tmp-dir!) | |
in-files (->> fs | |
core/output-files | |
(core/not-by-ext [".clj"]) | |
(map (juxt core/tmp-path core/tmp-file)))] | |
(doseq [[rel-path in-file] in-files] | |
(let [out-file (doto (io/file tgt (str rel-path "/foo")) io/make-parents)] | |
(println " in-file: " in-file) | |
(println "tmp out-file: " out-file) | |
(core/cp fs in-file out-file))) | |
(core/add-asset fs tgt) | |
(core/commit! fs)))) |
micha
commented
Feb 16, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment