Writing per-tool configuration files
tools.deps.config defines functions to read a tool's configuration files. This library provides functions to write those files. The two are separate to isolate dependencies needed for writing but not reading.
TBD
Tools are identified by a qualified lib symbol (e.g., my.org/my-tool). Tool
config files live under a .cli-config directory at one of two locations:
:user- the user config dir shared by all of a user's projects:project- the project dir specific to a single project
The write functions create files and directories as needed.
(require '[clojure.tools.deps.config.edit :as dce])(write-config location lib config) - write the config as EDN, overwriting any existing file
(dce/write-config :project 'my.org/my-tool {:width 120})(assoc-config location lib k v) - set a single key in the config file, preserving existing formatting and comments
;; Persist one setting, creating the file if it does not exist
(dce/assoc-config :user 'my.org/my-tool :color :dark)Copyright © Rich Hickey and contributors
All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.