mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 16:21:57 -05:00
📎 Add improved kondo hook analyzer for rumext/fnc
This commit is contained in:
parent
4dc41724de
commit
e8808bc8a4
2 changed files with 14 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
|||
app.util.services/defmethod hooks.export/service-defmethod
|
||||
app.common.record/defrecord hooks.export/penpot-defrecord
|
||||
app.db/with-atomic hooks.export/penpot-with-atomic
|
||||
rumext.v2/fnc hooks.export/rumext-fnc
|
||||
}}
|
||||
|
||||
:output
|
||||
|
|
|
@ -58,6 +58,19 @@
|
|||
(api/vector-node [params params])]
|
||||
body))})))
|
||||
|
||||
(defn rumext-fnc
|
||||
[{:keys [node]}]
|
||||
(let [[cname mdata params & body] (rest (:children node))
|
||||
[params body] (if (api/vector-node? mdata)
|
||||
[mdata (cons params body)]
|
||||
[params body])]
|
||||
(let [result (api/list-node
|
||||
(into [(api/token-node 'fn)
|
||||
params]
|
||||
(cons mdata body)))]
|
||||
{:node result})))
|
||||
|
||||
|
||||
(defn penpot-defrecord
|
||||
[{:keys [:node]}]
|
||||
(let [[rnode rtype rparams & other] (:children node)
|
||||
|
|
Loading…
Add table
Reference in a new issue