Gno.Manifest.Generator (Gno v0.1.0)

Copy Markdown View Source

Generator for the manifest files of a Gno repository.

Summary

Functions

Returns a formatted string of available store adapter type names.

Returns the default template directory for manifest generation.

Generates the manifest files for a Gno repository.

Functions

adapter_types()

Returns a formatted string of available store adapter type names.

default_template_dir()

Returns the default template directory for manifest generation.

Configuration

The default template directory can be configured with the :manifest_template_dir option of the :gno application configuration:

config :gno, manifest_template_dir: "custom/path"

generate(manifest_type, project_dir, opts \\ [])

@spec generate(Gno.Manifest.Type.t(), Path.t(), keyword()) :: :ok | {:error, any()}

Generates the manifest files for a Gno repository.

The project_dir is the root directory of the project where additional directories may be created by custom manifest types. The manifest files themselves will be generated in a subdirectory determined by the last path in the load path.

Options

  • :adapter - Initial store adapter (optional, default: Gno.Store for the generic store)
  • :template - Custom template directory
  • :force - Flag to overwrite existing destination directory (default: false)
  • :assigns - Additional assigns for EEx templates