Skip to main content

Crate openeis_generate

Crate openeis_generate 

Source
Expand description

openeis-generate: project/template generator configuration layer.

Configuration is authored in KDL. This crate currently ports (and streamlines) cargo-generate’s config subsystem:

  • config: per-template config (template.kdl inside a template)
  • app_config: user-global favorites config (~/.config/openeis/openeis.kdl)
  • vcs: the Vcs enum (extracted out of cargo-generate’s args module)

Re-exports§

pub use app_config::app_config_path;
pub use app_config::AppConfig;
pub use app_config::DefaultsConfig;
pub use app_config::FavoriteConfig;
pub use archive::pack;
pub use archive::detect as detect_format;
pub use archive::Format;
pub use archive::PackStats;
pub use cli::Cli;
pub use cli::Command;
pub use cli::PackageArgs;
pub use cli::TemplateSource;
pub use cli::TemplateSourceKind;
pub use config::Config;
pub use config::ConditionalConfig;
pub use config::HookPhase;
pub use config::HooksConfig;
pub use config::Placeholder;
pub use config::TemplateConfig;
pub use config::CONFIG_FILE_NAME;
pub use generate::expand;
pub use generate::render_template;
pub use generate::GenerationOptions;
pub use generate::GenerationStats;
pub use variables::collect_variables;
pub use variables::parse_defines;
pub use variables::Variables;
pub use vcs::Vcs;

Modules§

app_config
Application-level (user-global) configuration, ported from cargo-generate’s app_config.rs but deserialized from KDL.
archive
Compressed-archive template sources and packaging (zip / tar.gz / tar.zst).
cli
Command-line interface (clap).
conditional
Conditional placeholder/filter overrides.
config
Per-template configuration, ported from cargo-generate’s config.rs but deserialized from KDL instead of TOML.
generate
Template expansion: copy a template directory into a destination, rendering Liquid ({{ var }}) in file names and contents.
git
Git template source.
hooks
Rhai hooks (init / pre / post).
package
package subcommand: bundle a template directory into a distributable archive (zip / tar.gz / tar.zst).
template_filters
Custom Liquid filters: case-conversion helpers usable in templates as {{ name | kebab_case }}, {{ name | snake_case }}, etc.
variables
Template variable collection — ported (focused) from cargo-generate’s project_variables.rs + template_values.rs.
vcs