package stog

  1. Overview
  2. Docs

Module Stog.ConfigSource

Reading stog config.

Sourceval debug : bool ref
Sourcetype module_levels = {
  1. module_name : string;
  2. levels : (string * int list) list;
}
Sourcetype t = {
  1. ignored : string list;
  2. documents : string list;
  3. not_documents : string list;
  4. levels : module_levels list;
}

Contents of .stog/config file.

Sourceval config_dir : string -> string

config_dir dir returns the stog configuration directory in the given directory.

Sourceval config_file : string -> string

config_file dir returns the stog config file for a given project directory, that is Filename.concat (config_dir dir) "config".

Sourceval tmpl_dir : string -> string

tmpl_dir dir returns the directory containing templates, from a stog project directory.

Sourceval cache_dir : string -> string

cache_dir dir returns the cache directory, from a stog project directory.

Sourceval modules_dir : string -> string

modules_dir dir returns the modules directory, from a stog project directory.

Sourceval read_config : string -> t

read_config file returns the configuration stored in the given stog configuration file. If the file does not exists, it is created. The file is also written back, so that new fields automatically appear in the file.