mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 20:36:10 +02:00
✨ Include features info in exported zipfiles
This commit is contained in:
parent
1b8e4dfdfa
commit
94cdd4a481
4 changed files with 14 additions and 14 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
(defn create-manifest
|
||||
"Creates a manifest entry for the given files"
|
||||
[team-id file-id export-type files]
|
||||
[team-id file-id export-type files components-v2]
|
||||
(letfn [(format-page [manifest page]
|
||||
(-> manifest
|
||||
(assoc (str (:id page))
|
||||
|
@ -37,10 +37,14 @@
|
|||
(mapv str))
|
||||
index (->> (get-in file [:data :pages-index])
|
||||
(vals)
|
||||
(reduce format-page {}))]
|
||||
(reduce format-page {}))
|
||||
features (cond-> []
|
||||
components-v2
|
||||
(conj "components/v2"))]
|
||||
(-> manifest
|
||||
(assoc (str (:id file))
|
||||
{:name name
|
||||
:features features
|
||||
:shared is-shared
|
||||
:pages pages
|
||||
:pagesIndex index
|
||||
|
@ -395,7 +399,7 @@
|
|||
|
||||
manifest-stream
|
||||
(->> files-stream
|
||||
(rx/map #(create-manifest team-id file-id export-type %))
|
||||
(rx/map #(create-manifest team-id file-id export-type % components-v2))
|
||||
(rx/map #(vector "manifest.json" %)))
|
||||
|
||||
render-stream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue