Skip to content

clojure/tools.deps.config.edit

Repository files navigation

tools.deps.config.edit

Writing per-tool configuration files

Rationale

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.

Release Information

TBD

API

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:

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)

Developer Information

Copyright and License

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.

About

Configuration writing for tools.deps based libraries and tools

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors