mirror of
https://github.com/penpot/penpot.git
synced 2025-08-01 23:48:59 +02:00
Merge pull request #5196 from penpot/niwinz-remove-graaljs
⬆️ Update deps (part 1) and remove graalvm js
This commit is contained in:
commit
e7d7291947
58 changed files with 2738 additions and 46535 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
(ns app.main.data.workspace.media
|
||||
(:require
|
||||
["svgo" :as svgo]
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.exceptions :as ex]
|
||||
|
@ -14,7 +15,6 @@
|
|||
[app.common.logging :as log]
|
||||
[app.common.math :as mth]
|
||||
[app.common.schema :as sm]
|
||||
[app.common.svg :refer [optimize]]
|
||||
[app.common.svg.shapes-builder :as csvg.shapes-builder]
|
||||
[app.common.types.container :as ctn]
|
||||
[app.common.types.shape :as cts]
|
||||
|
@ -37,15 +37,15 @@
|
|||
[promesa.core :as p]
|
||||
[tubax.core :as tubax]))
|
||||
|
||||
(def ^:private svgo-config
|
||||
{:multipass false
|
||||
:plugins ["safeAndFastPreset"]})
|
||||
(defn- optimize
|
||||
[input]
|
||||
(svgo/optimize input svgo/defaultOptions))
|
||||
|
||||
(defn svg->clj
|
||||
[[name text]]
|
||||
(try
|
||||
(let [text (if (contains? cf/flags :frontend-svgo)
|
||||
(optimize text svgo-config)
|
||||
(optimize text)
|
||||
text)
|
||||
data (-> (tubax/xml->clj text)
|
||||
(assoc :name name))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue