Skip to content

Commit

Permalink
Remove spliced conditional reader for cljs
Browse files Browse the repository at this point in the history
  • Loading branch information
caumond committed Jan 18, 2024
1 parent ac471fc commit 4acec22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/cljc/automaton_core/configuration/environment.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
[automaton-core.utils.keyword :as utils-keyword]
[clojure.string :as str]))

#?@(:cljs [(def ^:private nodejs? (exists? js/require))
(def ^:private process (when nodejs? (js/require "process")))])
#?(:cljs (def ^:private nodejs? (exists? js/require)))

#?(:cljs (def ^:private process (when nodejs? (js/require "process"))))

(defn env-key-path
"Turns key-path ([:a :b :c] -> 'a-b-c') into environment type key."
Expand Down
4 changes: 2 additions & 2 deletions src/cljc/automaton_core/configuration/files.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
[automaton-core.utils.keyword :as utils-keyword]
[automaton-core.utils.map :as utils-map]))

#?@(:cljs [(def ^:private nodejs? (exists? js/require))
(def ^:private fs (when nodejs? (js/require "fs")))])
#?(:cljs (def ^:private nodejs? (exists? js/require)))
#?(:cljs (def ^:private fs (when nodejs? (js/require "fs"))))

(defn slurp-file
[f]
Expand Down

0 comments on commit 4acec22

Please sign in to comment.