pub trait CompilerPlugins: Send + Sync {
// Required methods
fn transform_markup(
&self,
src: String,
entry: &Path,
) -> Result<String, String>;
fn transform_css(
&self,
src: String,
entry: &Path,
file: &Path,
) -> Result<String, String>;
fn transform_ir(
&self,
ir: &mut LayoutIR,
entry: &Path,
) -> Result<(), String>;
fn finish(&self, ir: &LayoutIR, entry: &Path) -> Result<Vec<String>, String>;
}Expand description
The loaded compiler-plugin chain of one app. Implemented in lumenc over
the lumenc-plugin loader; every hook runs the declared plugins in
lumen.toml order.
Required Methods§
Sourcefn transform_markup(&self, src: String, entry: &Path) -> Result<String, String>
fn transform_markup(&self, src: String, entry: &Path) -> Result<String, String>
Rewrite the entry markup text, before <include> splicing.
Sourcefn transform_css(
&self,
src: String,
entry: &Path,
file: &Path,
) -> Result<String, String>
fn transform_css( &self, src: String, entry: &Path, file: &Path, ) -> Result<String, String>
Rewrite the entry stylesheet text, before @import splicing.