Skip to content

Commit

Permalink
refactor(ssg): 🎨 re-organising compiler service
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Apr 9, 2024
1 parent 7d0ece2 commit 870501d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! function to generate the website.

// Import the required libraries and modules.
use ssg::compiler::compile;
use ssg::compiler::service::compile;
use ssg::server::serve::start;
use std::path::Path;

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use crate::macro_check_directory;
use crate::{compile, macro_get_args};
use crate::{compiler::service::compile, macro_get_args};
use clap::ArgMatches;
use std::path::Path;

Expand Down
5 changes: 5 additions & 0 deletions src/compiler/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright © 2024 Shokunin Static Site Generator. All rights reserved.
// SPDX-License-Identifier: Apache-2.0 OR MIT

/// The `service` module contains the compiler service.
pub mod service;
File renamed without changes.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
//! And in your `main.rs`:
//!
//! ```rust
//! use ssg::compiler::compile;
//! use ssg::compiler::service::compile;
//! use std::path::Path;
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
Expand Down Expand Up @@ -112,12 +112,12 @@
#![crate_type = "lib"]

use crate::{
compiler::service::compile,
languages::translate,
loggers::init_logger, server::serve::start,
utilities::uuid::generate_unique_string,
};
use cmd::cli::print_banner;
use compiler::compile;
use dtt::DateTime;
use rlg::{log_format::LogFormat, log_level::LogLevel, macro_log};
use std::{error::Error, fs::File, io::Write, path::Path};
Expand Down

0 comments on commit 870501d

Please sign in to comment.