From b2ce1fa75eb5e876430fcc3b9b49fe8d8b0f3b59 Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 29 Mar 2024 10:25:48 +0100 Subject: [PATCH] Use inline-resource macro again --- .../dda/c4k_common/namespace/namespace_internal.cljc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/cljc/dda/c4k_common/namespace/namespace_internal.cljc b/src/main/cljc/dda/c4k_common/namespace/namespace_internal.cljc index 284a643..b7bc156 100644 --- a/src/main/cljc/dda/c4k_common/namespace/namespace_internal.cljc +++ b/src/main/cljc/dda/c4k_common/namespace/namespace_internal.cljc @@ -1,18 +1,14 @@ (ns dda.c4k-common.namespace.namespace-internal (:require [clojure.spec.alpha :as s] - #?(:cljs [shadow.resource :as rc]) #?(:clj [orchestra.core :refer [defn-spec]] :cljs [orchestra.core :refer-macros [defn-spec]]) - [dda.c4k-common.yaml :as yaml])) - + [dda.c4k-common.yaml :as yaml] + #?(:cljs [dda.c4k-common.macros :refer-macros [inline-resources]]))) #?(:cljs (defmethod yaml/load-resource :namespace [resource-name] - (case resource-name - "namespace/namespace.yaml" (rc/inline "namespace/namespace.yaml") - (throw (js/Error. (str "Undefined Resource: " resource-name)))))) - + (get (inline-resources "namespace") resource-name))) (s/def ::namespace string?)