From 072cec7a22e92f6d3e9b15add9c22995b2bf35a4 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Fri, 8 Nov 2024 09:58:42 +0100 Subject: [PATCH] Add testing block --- .../ui/workspace/tokens/style_dictionary.cljs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs b/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs index 72771c4fa..c38876211 100644 --- a/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/style_dictionary.cljs @@ -128,6 +128,24 @@ (.buildAllPlatforms "json") (p/then #(.-allTokens ^js %))))) +(comment + (-> (StyleDictionary. default-config) + (enable-debug) + (add-tokens {"foo" (ctob/make-token :type :border-radius + :value "12px" + :name "foo") + "bar" (ctob/make-token :type :border-radius + :value "{foo} * 2" + :name "foo") + "color" (ctob/make-token :type :color + :value "red" + :name "color")}) + (build-dictionary) + (p/finally (fn [x err] + (js/console.log "x err" x err)))) + nil) + + (defn resolve-tokens-tree+ ([tokens-tree get-token] (resolve-tokens-tree+ tokens-tree get-token (StyleDictionary. default-config)))