@usine/config/yaml/writer
Classes
Section titled “Classes”YamlEdit
Section titled “YamlEdit”One replacement in authored YAML, preserving the surrounding file.
Extends
Section titled “Extends”Schema.Class
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new YamlEdit(…
args):YamlEdit
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[props: object, options?: MakeOptions] |
Returns
Section titled “Returns”Properties
Section titled “Properties”
readonlypath: readonlystring[]
Path in file-key spelling, for example ["settings", "max_children"].
readonlyvalue:Json
Variables
Section titled “Variables”updateFrontmatter
Section titled “updateFrontmatter”
constupdateFrontmatter: (file,source,edit) =>Effect.Effect<string,ConfigFileError,never>
Sets one YAML path in the frontmatter of a Markdown config file and returns the whole file.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
file |
string & Brand |
source |
string |
edit |
YamlEdit |
Returns
Section titled “Returns”Effect.Effect<string, ConfigFileError, never>
updateYaml
Section titled “updateYaml”
constupdateYaml: (file,source,edit) =>Effect.Effect<string,ConfigFileError,never>
Sets one YAML path and returns the file with its comments, key order, and newline style intact.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
file |
string & Brand |
source |
string |
edit |
YamlEdit |
Returns
Section titled “Returns”Effect.Effect<string, ConfigFileError, never>