Skip to content

Commit

Permalink
Make (sift :move) create resources (#680)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhagany authored and alandipert committed Jun 20, 2018
1 parent 59909f1 commit 37fa9fb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions boot/core/src/boot/task_helpers.clj
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,14 @@
(defmethod sift-action :move
[_ _ args]
(let [proc #(reduce-kv string/replace % args)
reducer (fn [xs k v]
(let [k (proc k)]
(assoc xs k (assoc v :path k))))]
mkreducer (fn [dir]
(fn [xs k v]
(let [k (proc k)]
(assoc xs k (assoc v :path k :dir dir)))))]
(fn [fileset]
(->> (partial reduce-kv reducer {})
(update-in fileset [:tree])))))
(let [dir (#'core/get-add-dir fileset #{:resource})]
(->> (partial reduce-kv (mkreducer dir) {})
(update-in fileset [:tree]))))))

(defmethod sift-action :add-jar
[v? _ args]
Expand Down

0 comments on commit 37fa9fb

Please sign in to comment.