mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 17:00:36 -05:00
✨ Add bundled svgo library and expose it on common module
The svgo bundle is included directly as esm module, no npm dependency here because the module is bundled from a custom fork located on penpot github organization: https://github.com/penpot/svgo
This commit is contained in:
parent
813c9de636
commit
3877eccc29
2 changed files with 21686 additions and 0 deletions
16
common/src/app/common/svg.cljc
Normal file
16
common/src/app/common/svg.cljc
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
;;
|
||||||
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
|
(ns app.common.svg
|
||||||
|
#?(:cljs
|
||||||
|
(:require
|
||||||
|
["./svg_optimizer.js" :as svgo])))
|
||||||
|
|
||||||
|
#?(:cljs
|
||||||
|
(defn optimize
|
||||||
|
([input] (optimize input nil))
|
||||||
|
([input options]
|
||||||
|
(svgo/optimize input (clj->js options)))))
|
21670
common/src/app/common/svg_optimizer.js
Normal file
21670
common/src/app/common/svg_optimizer.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue