Skip to content

Commit

Permalink
Merge pull request #98 from yuma140902/refactor-modules
Browse files Browse the repository at this point in the history
refactor modules
  • Loading branch information
yuma140902 authored Dec 18, 2023
2 parents df0139c + 3419f2f commit 5687031
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ use path_absolutize::Absolutize;
use tracing::{debug, warn};
use walkdir::WalkDir;

use crate::project_config::ProjectConfig;
use crate::{project_config::ProjectConfig, transformer::handlebars_helpers};

pub mod cli;
pub mod directory;
pub mod handlebars_helpers;
mod loader;
pub mod pipeline;
pub mod project_config;
pub mod store;
mod string_matcher;
mod template_engine;
pub mod transformer;
mod value;

pub use loader::*;
pub use string_matcher::*;
pub use template_engine::*;
pub use value::*;

#[tracing::instrument(ret)]
Expand Down
7 changes: 6 additions & 1 deletion src/transformer/template_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ use anyhow::Context;
use serde::{Deserialize, Serialize};
use tracing::warn;

use crate::{store::Store, TemplateEngine, Value};
use crate::{store::Store, Value};

use self::template_engine::TemplateEngine;

use super::Transformer;

pub mod handlebars_helpers;
pub mod template_engine;

#[derive(Debug, Deserialize, Serialize)]
pub struct TemplateRenderer {
pub template_key: String,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use handlebars::Handlebars;
use tracing::{debug, error, warn};

use crate::handlebars_helpers;
use super::handlebars_helpers;

/// TemplateEngine is a wrapper for Handlebars and processes templates and [`Value`](crate::Value)s.
pub struct TemplateEngine(Handlebars<'static>);
Expand Down

0 comments on commit 5687031

Please sign in to comment.