mirror of
https://github.com/penpot/penpot.git
synced 2026-05-05 08:08:27 +00:00
27 lines
778 B
Clojure
27 lines
778 B
Clojure
;; 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.util.code-gen
|
|
(:require
|
|
[app.util.code-gen.markup-html :as html]
|
|
[app.util.code-gen.markup-svg :as svg]
|
|
[app.util.code-gen.style-css :as css]))
|
|
|
|
(defn generate-markup-code
|
|
[objects type shapes]
|
|
(let [generate-markup
|
|
(case type
|
|
"html" html/generate-markup
|
|
"svg" svg/generate-markup)]
|
|
(generate-markup objects shapes)))
|
|
|
|
(defn generate-style-code
|
|
[objects type shapes]
|
|
(let [generate-style
|
|
(case type
|
|
"css" css/generate-style)]
|
|
(generate-style objects shapes)))
|