mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 14:47:24 +02:00
🐛 Make the library generate output compatible with penpot 2.7.x
This commit is contained in:
parent
eafea7aec9
commit
4b22a0ebfb
2 changed files with 32 additions and 4 deletions
|
@ -82,6 +82,14 @@
|
|||
:is-shared
|
||||
:version})
|
||||
|
||||
(defn- encode-shape*
|
||||
[{:keys [type] :as shape}]
|
||||
(let [shape (if (or (= type :path)
|
||||
(= type :bool))
|
||||
(update shape :content vec)
|
||||
shape)]
|
||||
(-> shape encode-shape json/encode)))
|
||||
|
||||
(defn- generate-file-export-procs
|
||||
[{:keys [id data] :as file}]
|
||||
(cons
|
||||
|
@ -109,7 +117,7 @@
|
|||
(map (fn [[shape-id shape]]
|
||||
(let [shape (assoc shape :page-id page-id)]
|
||||
[(str "files/" id "/pages/" page-id "/" shape-id ".json")
|
||||
(delay (-> shape encode-shape json/encode))]))
|
||||
(delay (encode-shape* shape))]))
|
||||
objects)))))))
|
||||
|
||||
(->> (get data :components)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue