Created
November 23, 2014 22:22
-
-
Save micha/0a510590fc57527d1af8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| (require '[boot.core :as core] | |
| '[boot.file :as file] | |
| '[clojure.java.io :as io]) | |
| (let [tmpd (core/mktgtdir!) | |
| srcs (->> (core/src-files+) (core/by-ext [".scss" ".sass"]))] | |
| ;; make hardlinks for all the scss and sass files into the tempdir | |
| (doseq [in srcs] | |
| (let [rel-path (core/relative-path in) | |
| out (io/file tmpd rel-path)] | |
| (file/copy-with-lastmod in out))) | |
| ;; given some file with path p in one of the user's source or resource dirs, | |
| ;; you can find the corresponding file that's been copied to the tempdir above | |
| ;; like this: | |
| (let [file-user-refers-to (io/file p) | |
| relative-path-of-file (core/relative-path file-user-refers-to) | |
| corresponding-tempfile (io/file tmpd relative-path-of-file)] | |
| ;; here you can tell sassc to compile corresponding-tempfile | |
| ) | |
| ) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment