Merge pull request #75 from benswift/master
bugfix for `compass-installed?`
This commit is contained in:
commit
78804d61e8
1 changed files with 10 additions and 8 deletions
|
@ -15,9 +15,12 @@
|
||||||
(= 0 (:exit (sh "sass" "--version"))))
|
(= 0 (:exit (sh "sass" "--version"))))
|
||||||
|
|
||||||
(defn compass-installed?
|
(defn compass-installed?
|
||||||
"Checks for the installation of Compass."
|
"Checks for the installation of Compass."
|
||||||
[]
|
[]
|
||||||
(= 0 (:exit (sh "compass" "--version"))))
|
(try
|
||||||
|
(= 0 (:exit (sh "compass" "--version")))
|
||||||
|
(catch java.io.IOException _
|
||||||
|
false)))
|
||||||
|
|
||||||
(defn find-sass-files
|
(defn find-sass-files
|
||||||
"Given a Diretory, gets files, Filtered to those having scss or sass
|
"Given a Diretory, gets files, Filtered to those having scss or sass
|
||||||
|
@ -37,10 +40,9 @@
|
||||||
dest-sass
|
dest-sass
|
||||||
base-dir]}]
|
base-dir]}]
|
||||||
(shell/with-sh-dir base-dir
|
(shell/with-sh-dir base-dir
|
||||||
(sh "sass"
|
(if (compass-installed?)
|
||||||
"--update"
|
(sh "sass" "--compass" "--update" (str src-sass ":" dest-sass))
|
||||||
(when (compass-installed?) "--compass")
|
(sh "sass" "--update" (str src-sass ":" dest-sass)))))
|
||||||
(str src-sass ":" dest-sass))))
|
|
||||||
|
|
||||||
(defn compile-sass->css!
|
(defn compile-sass->css!
|
||||||
"Given a directory src-sass, looks for all sass files and compiles them into
|
"Given a directory src-sass, looks for all sass files and compiles them into
|
||||||
|
@ -55,7 +57,7 @@ the command. Shows you any problems it comes across when compiling. "
|
||||||
;; I found sass files,
|
;; I found sass files,
|
||||||
;; If sass is installed
|
;; If sass is installed
|
||||||
(do
|
(do
|
||||||
(println "Compiling Sass Files:" src-sass dest-sass)
|
(println "\t" (cyan src-sass) "-->" (cyan dest-sass))
|
||||||
(let [result (compile-sass-file! opts)]
|
(let [result (compile-sass-file! opts)]
|
||||||
(if (zero? (:exit result))
|
(if (zero? (:exit result))
|
||||||
;; no problems in sass compilation
|
;; no problems in sass compilation
|
||||||
|
|
Loading…
Reference in a new issue