docs: migrate lib.importers to doc-comments
This commit is contained in:
parent
9ba13a521e
commit
fca12d06bc
1 changed files with 18 additions and 8 deletions
|
|
@ -1,13 +1,23 @@
|
|||
lib: {
|
||||
## Import a JSON file as a Nix value.
|
||||
##
|
||||
## @notest
|
||||
## @type Path -> a
|
||||
/**
|
||||
Import a JSON file as a Nix value.
|
||||
|
||||
# Type
|
||||
|
||||
```
|
||||
json :: Path -> Any
|
||||
```
|
||||
*/
|
||||
json = file: builtins.fromJSON (builtins.readFile file);
|
||||
|
||||
## Import a TOML file as a Nix value.
|
||||
##
|
||||
## @notest
|
||||
## @type Path -> a
|
||||
/**
|
||||
Import a TOML file as a Nix value.
|
||||
|
||||
# Type
|
||||
|
||||
```
|
||||
json :: Path -> Any
|
||||
```
|
||||
*/
|
||||
toml = file: builtins.fromTOML (builtins.readFile file);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue