You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are probably many instances in which you'd like to share settings between server side and client side code. Right now settings.clj and settings/custom.clj are only used by server side clojure. All settings should probably not be shared: you don't want to ship your database settings to the client side.
One way to do this might be to use the Closure compiler's @define / --define semantics.
The text was updated successfully, but these errors were encountered:
I've written an initial version of this, but am open to changes.
Settings are organized into namespaces. Each namespace has an 'options Var that contain stuff like :dev-mode. Each settings namespace may load options differently, but typically they set up some defaults then merge in the options from "settings/[name].clj" in the classpath. The classpath includes test-resources and resources in development, but only resources in production. See (test-)resources/settings/global.clj as an example.
Sharing settings with CLJS is done at compile time. A clojure macro that is given a name and a namespace will def that name as the options map for the namespace. See cljs/src/initializer/settings-page.cljs for an example.
There are probably many instances in which you'd like to share settings between server side and client side code. Right now
settings.clj
andsettings/custom.clj
are only used by server side clojure. All settings should probably not be shared: you don't want to ship your database settings to the client side.One way to do this might be to use the Closure compiler's @define / --define semantics.
The text was updated successfully, but these errors were encountered: