Actualiza la organización del código para las apps
This commit is contained in:
parent
96cbbb0c3c
commit
9485179257
21 changed files with 13 additions and 16 deletions
|
|
@ -1,4 +1,3 @@
|
|||
pub mod app; // API to initialize the PageTop base application.
|
||||
pub mod component; // API to build new components.
|
||||
pub mod hook; // API to define functions that alter the behavior of PageTop core.
|
||||
pub mod module; // API to add new features with modules.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use crate::{Lazy, run_now, trace};
|
||||
use crate::core::app;
|
||||
use crate::{Lazy, app, run_now, trace};
|
||||
use crate::core::hook::add_hook;
|
||||
use crate::db::*;
|
||||
use super::ModuleTrait;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use crate::util;
|
||||
use crate::core::app;
|
||||
use crate::{app, util};
|
||||
use crate::core::hook::HookItem;
|
||||
|
||||
#[cfg(any(feature = "mysql", feature = "postgres", feature = "sqlite"))]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use crate::{Lazy, theme_static_files, trace};
|
||||
use crate::core::app;
|
||||
use crate::{Lazy, app, theme_static_files, trace};
|
||||
use super::ThemeTrait;
|
||||
|
||||
use std::sync::RwLock;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
use crate::{concat_string, util};
|
||||
use crate::{app, concat_string, util};
|
||||
use crate::config::SETTINGS;
|
||||
use crate::html::{Markup, html};
|
||||
use crate::core::app;
|
||||
use crate::core::component::{ComponentTrait, Favicon, InContext};
|
||||
use crate::response::page::Page;
|
||||
use crate::base::component::Chunck;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ pub mod html; // HTML en código.
|
|||
#[cfg(any(feature = "mysql", feature = "postgres", feature = "sqlite"))]
|
||||
pub mod db; // Acceso a base de datos.
|
||||
|
||||
pub mod core; // Main APIs for app, components, hooks, modules and themes.
|
||||
pub mod app; // Prepare and run the application.
|
||||
|
||||
pub mod core; // Main APIs for components, hooks, modules and themes.
|
||||
|
||||
pub mod response; // Tipos de respuestas web.
|
||||
pub mod base; // Base de componentes, módulos y temas.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ pub use fluent_templates::fluent_bundle::FluentValue;
|
|||
macro_rules! localize {
|
||||
( $dir_locales:literal $(, $core_locales:literal)? ) => {
|
||||
use $crate::locale::*;
|
||||
use $crate::core::app::locale::LANGID;
|
||||
use $crate::app::locale::LANGID;
|
||||
|
||||
static_locale! {
|
||||
static LOCALES = {
|
||||
|
|
|
|||
|
|
@ -21,15 +21,16 @@ pub use crate::{
|
|||
migration_item,
|
||||
};
|
||||
|
||||
pub use crate::app;
|
||||
pub use crate::app::AppTrait;
|
||||
pub use crate::app::application::Application;
|
||||
|
||||
pub use crate::{hook_item, core::{
|
||||
app,
|
||||
component::*,
|
||||
hook::*,
|
||||
module::*,
|
||||
theme::*,
|
||||
}};
|
||||
pub use crate::core::app::AppTrait;
|
||||
pub use crate::core::app::application::Application;
|
||||
|
||||
pub use crate::response::page::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
use crate::{Lazy, trace};
|
||||
use crate::{Lazy, app, trace};
|
||||
use crate::config::SETTINGS;
|
||||
use crate::html::*;
|
||||
use crate::core::app;
|
||||
use crate::core::hook::{hook_ref, run_hooks};
|
||||
use crate::core::component::*;
|
||||
use super::{BEFORE_RENDER_PAGE_HOOK, BeforeRenderPageHook};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue