4 Supported formats
The default Req file format is JSON but also the Racket Data format is supported.
The format parser is picked based on the file extension, so ".json" for JSON and ".rktd" for Racket Data. Because of that, giving Req a JSON file containing Racket data will cause it to crash.
Also, Racket’s JSON parser is very picky about given data, this means, most importantly: no comments and no leftover commas.
By default if the flag --file is not given, then Req will search the following paths, in order:
"req.json"
".req.json"
".config/req.json"
"req.rktd"
".req.rktd"
".config/req.rktd"
4.1 Special keys
Any keys other than "root", "catalogs" or "local" are treated as "extra" set, such set contains a list of packages that can be installed with either --extra or --extras flag passed to raco req (see the Req command-line interface documentation for more details).
extra | = | (list package-name ...) | ||
package-name | = | string |
4.1.1 root
root | = | string |
Specifies the location of root directory of project’s sub-packages.
4.1.2 catalogs
catalogs | = | (list catalog-url ..) | ||
catalog-url | = | string |
Specifies a list of catalogs to overwrite the default Racket catalogs. If this list is not given or empty, then the default catalogs are used.
4.1.3 local
local | = | (list package ...) | ||
package | = | package-path | ||
| | (list package-path package-name) | |||
package-path | = | string | ||
package-name | = | string |
Specifies a list of local packages.
Each package can either be a path (inside the package root directory) or a list containig two elements:
path appended to package root directory path,
name overwriting the default name of that package.
If a string is used, then it can contain wildcards used to glob directories inside the package root directory (which can be overwritten by the "root" key).
4.2 JSON
Example of a single-package project using JSON as a configuration format:
{
"local": [
[".", "mylib"]
],
"dev": [
"ziptie-completion"
]
}
Example of a multi-package project using JSON as a configuration format:
{
"root": "src",
"local": [
"mylib*"
],
"dev": [
"ziptie-completion"
]
}
4.3 Racket Data
Example of a single-package project using RKTD as a configuration format:
((local ((. mylib)))
(dev (ziptie-completion)))
Example of a multi-package project using RKTD as a configuration format:
((root src)
(local (mylib*))
(dev (ziptie-completion)))