glcov/toml

Types

pub type PathDependency {
  PathDependency(name: String, path: String)
}

Constructors

  • PathDependency(name: String, path: String)

Values

pub fn javascript_source_maps(contents: String) -> Bool

Whether [javascript] source_maps is enabled.

pub fn path_dependencies(
  contents: String,
) -> List(PathDependency)

Direct runtime path dependencies from [dependencies].

Only direct dependencies are returned. Development dependencies are intentionally skipped because tools such as glcov are commonly declared there as path dependencies and should not enter project coverage.

pub fn project_name(contents: String) -> option.Option(String)
pub fn target(contents: String) -> option.Option(String)
pub fn top_level_value(
  contents: String,
  key: String,
) -> option.Option(String)

A deliberately small reader for the two top-level values glcov needs.

It only looks before the first table header, which is where name and target live in a normal gleam.toml. A full TOML parser would add a dependency for no benefit here.

✨ Search Document