mirror of
https://github.com/penpot/penpot.git
synced 2025-07-14 14:57:16 +02:00
✨ Plugins support for code generation
This commit is contained in:
parent
8ff0015458
commit
f86156b619
4 changed files with 61 additions and 10 deletions
|
@ -300,10 +300,10 @@ body {
|
|||
(defn generate-style
|
||||
([objects root-shapes all-shapes]
|
||||
(generate-style objects root-shapes all-shapes nil))
|
||||
([objects root-shapes all-shapes options]
|
||||
([objects root-shapes all-shapes {:keys [with-prelude?] :or {with-prelude? true} :as options}]
|
||||
(let [options (assoc options :root-shapes (into #{} (map :id) root-shapes))]
|
||||
(dm/str
|
||||
prelude
|
||||
(if with-prelude? prelude "")
|
||||
(->> all-shapes
|
||||
(keep #(get-shape-css-selector % objects options))
|
||||
(str/join "\n\n"))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue