poly
workspace
We have three categories of configuration:
Category | File(s) | Workspace Structure :configs key(s) |
---|---|---|
|
|
|
|
| |
|
|
|
If you are following along from our example workspace tutorial, you might notice some output does not exactly match what we show here.
In some cases, we added a bit of config just to show what it would look like.
|
workspace.edn
An initial workspace.edn
is automatically generated when you create a workspace.
You make changes by editing the workspace.edn
file directly.
You can list workspace configs with the ws command:
poly ws get:configs:workspace
{:bricks {"user-remote" {:keep-lib-versions [ring/ring slacker/slacker]}}
:compact-views #{},
:default-profile-name "default",
:interface-ns "interface",
:projects {"command-line" {:alias "cl",
:test {:setup-fn project.command-line.test-setup/setup,
:teardown-fn project.command-line.test-setup/teardown}},
"development" {:alias "dev"},
"user-service" {:alias "user-s"}},
:tag-patterns {:release "v[0-9]*", :stable "stable-*"},
:top-namespace "se.example",
:vcs {:auto-add true, :name "git"}}
The workspace map keys are:
Key | Description |
---|---|
| Brick-specific configuration where the map key is the brick name.
Specify |
| |
| The name of the profile that |
| Tells |
| See projects below. |
| |
| See Test configuration. |
| The top namespace used throughout the workspace in components and bases, specified by you when you create your workspace. |
| A map with two keys describing your version control system:
Default: |
You configure individual projects under the :projects
key.
You can retrieve projects config via:
poly ws get:configs:workspace:projects
{"command-line" {:alias "cl",
:test {:setup-fn project.command-line.test-setup/setup,
:teardown-fn project.command-line.test-setup/teardown}},
"development" {:alias "dev"},
"user-service" {:alias "user-s"
:test {:exclude ["mybrick"]}
:keep-lib-versions [org.slf4j/slf4j-nop]
:necessary ["helper"]}}
The keys are the full project names.
The default alias for the development
project is created for you when your create your workspace.
Deployable projects get no automatically generated config under :projects
.
Project map keys are:
Key | Description |
---|---|
| |
| Tells |
| Supports turning off |
| See next table below. |
You specify test configuration under the :test
key for a specific project:
Key | Description |
---|---|
| Lists the bricks to exclude when running tests for the project. 1 |
| Lists the bricks to include when running tests for the project. 1 |
| The function name (including namespace) to call before |
| The function name (including namespace) to call after |
Table notes:
deps.edn
FilesThe various poly create
commands create initial deps.edn
files.
You make changes via manual edits or the libs :update command.
Each project has its own deps.edn
configuration file.
You’ll find:
The development project config in ./deps.edn
.
The create workspace command creates the initial file.
Deployable projects are configured in projects/PROJECT-DIR/deps.edn
where PROJECT-DIR
is the deployable project’s directory (and name).
The create project command creates the initial file.
You can retrieve a project’s tools.deps config via, e.g.:
poly ws get:configs:projects:command-line
{:deps {:aliases {:test {:extra-deps {}, :extra-paths ["test"]},
:uberjar {:main se.example.cli.core}},
:deps {org.apache.logging.log4j/log4j-core {:mvn/version "2.13.3"},
org.apache.logging.log4j/log4j-slf4j-impl {:mvn/version "2.13.3"},
org.clojure/clojure {:mvn/version "1.11.1"},
poly/cli {:local/root "../../bases/cli"},
poly/user-remote {:local/root "../../components/user-remote"}}},
:name "command-line",
:type "project"}
Key | Description |
---|---|
| Content of project |
| (derived) The project name |
| (derived) Always |
Each base tools.deps config is found in bases/BASE-DIR/deps.edn
where BASE-DIR
is the base’s directory (and name).
The create base command creates the initial file.
You can retrieve a base’s tools.deps config via, e.g.:
poly ws get:configs:bases:cli
{:deps {:aliases {:test {:extra-deps {}, :extra-paths ["test"]}},
:deps {},
:paths ["src" "resources"]},
:name "cli",
:type "base"}
Key | Description |
---|---|
| Content of base |
| (derived) The base name. |
| (derived) Always |
Each component tools.deps config is found in components/COMPONENT-DIR/deps.edn
where COMPONENT-DIR
is the component’s directory (and name).
You can retrieve a component’s tools.deps config via, e.g.:
poly ws get:configs:components:user
{:deps {:aliases {:test {:extra-deps {}, :extra-paths ["test"]}},
:deps {},
:paths ["src" "resources"]},
:name "user",
:type "component"}
Key | Description |
---|---|
| The content of |
| (derived) The component name. |
| (derived) Always |
config.edn
You specify your user preferences in ~/.config/polylith/config.edn
.
If it does not already exist, the create workspace automatically creates this file for you.
You can retrieve the config via:
poly ws get:configs:user
{:color-mode "dark", :empty-character ".", :thousand-separator ","}
Key | Description |
---|---|
| |
| The thousands separator for |
| Tells the libs where it can find your local Maven repository, which it uses to calculate library |
| Contains a map with the keys |
If you have custom configuration data, then we suggest that you put it in a :custom
key in workspace.edn
at the root and/or under each brick/project. If you put your custom data there, it will not collide with future keys introduced by the tool.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close