more cleanup

This commit is contained in:
Dan Holmsand 2015-09-08 13:23:49 +02:00
parent 261166d4fe
commit 0847dcc9ed
1 changed files with 4 additions and 7 deletions

View File

@ -168,17 +168,14 @@
(.' fs mkdirSync d))))) (.' fs mkdirSync d)))))
(defn write-file [f content] (defn write-file [f content]
(let [fs (js/require "fs")] (mkdirs f)
(mkdirs f) (.' (js/require "fs") writeFileSync f content))
(.' fs writeFileSync f content)))
(defn read-file [f] (defn read-file [f]
(let [fs (js/require "fs")] (.' (js/require "fs") readFileSync f))
(.' fs readFileSync f)))
(defn path-join [& paths] (defn path-join [& paths]
(let [path (js/require "path")] (apply (.' (js/require "path") :join) paths))
(apply (.' path :join) paths)))
(defn read-css [] (defn read-css []
(string/join "\n" (map read-file (:css-infiles @config)))) (string/join "\n" (map read-file (:css-infiles @config))))