gws.spec.generator.manifest

Reader for application manifest files (MANIFEST.json).

Source code: gws.spec.generator.manifest

Module Contents

exception gws.spec.generator.manifest.Error

Bases: Exception

Raised when a manifest cannot be parsed.

gws.spec.generator.manifest.from_path(path)

Read a manifest file.

Parameters:

path – Path to the manifest file.

Returns:

A dict with the manifest keys; missing keys get defaults.

Raises:

Error – If the manifest is not valid JSON or a value is invalid.

gws.spec.generator.manifest.from_text(text, path)

Parse a manifest from text.

Lines starting with // or # are ignored. Relative plugin and tsConfig paths are resolved against the directory of path.

Parameters:
  • text – Manifest JSON text.

  • path – Path to the manifest file.

Returns:

A dict with the manifest keys; missing keys get defaults.

Raises:

Error – If the text is not valid JSON or a value is invalid.