💄 Fix format issues on exporter module

This commit is contained in:
Andrey Antukh 2023-11-29 12:55:22 +01:00
parent 87615ce221
commit 9fe32bb290
3 changed files with 11 additions and 13 deletions

View file

@ -31,8 +31,8 @@
(defn create-cookies (defn create-cookies
[uri {:keys [name token] :or {name "auth-token"}}] [uri {:keys [name token] :or {name "auth-token"}}]
(let [domain (str (:host uri) (let [domain (str (:host uri)
(when (:port uri) (when (:port uri)
(str ":" (:port uri))))] (str ":" (:port uri))))]
#js [#js {:domain domain #js [#js {:domain domain
:path "/" :path "/"
:name name :name name
@ -177,8 +177,7 @@
(p/catch (fn [cause] (p/catch (fn [cause]
(p/do! (p/do!
(ex-ignore (.destroy ^js pool browser)) (ex-ignore (.destroy ^js pool browser))
(p/rejected cause)))))) (p/rejected cause))))))]
]
(when-let [pool (deref pool)] (when-let [pool (deref pool)]
(-> (p/do! (.acquire ^js pool)) (-> (p/do! (.acquire ^js pool))

View file

@ -203,10 +203,10 @@
:name (:name entry) :name (:name entry)
:suffix (:suffix entry)})] :suffix (:suffix entry)})]
(let [xform (comp (let [xform (comp
(map #(assoc % :token token)) (map #(assoc % :token token))
(assoc-file-name))] (assoc-file-name))]
(->> (sequence xform exports) (->> (sequence xform exports)
(d/group-by (juxt :scale :type)) (d/group-by (juxt :scale :type))
(map second) (map second)
(into [] (mapcat process-group)))))) (into [] (mapcat process-group))))))

View file

@ -174,8 +174,7 @@
{"type" "element" {"type" "element"
"name" "radialGradient" "name" "radialGradient"
"attributes" {"id" id "cx" "0.5" "cy" "0.5" "r" "0.5"} "attributes" {"id" id "cx" "0.5" "cy" "0.5" "r" "0.5"}
"elements" (get-stops data)} "elements" (get-stops data)})))
)))
(get-gradients [id mapping] (get-gradients [id mapping]
(->> mapping (->> mapping