tailwind_rs_postcss/
js_bridge.rs1use crate::ast::CSSNode;
6use crate::error::Result;
7
8#[derive(Debug)]
10pub struct JSBridge {
11 runtime: JSRuntime,
12}
13
14#[derive(Debug)]
16pub struct JSRuntime {
17 }
19
20impl JSBridge {
21 pub fn new() -> Result<Self> {
23 Ok(Self {
24 runtime: JSRuntime::new()?,
25 })
26 }
27
28 pub async fn execute_plugin(&self, _plugin: &str, ast: CSSNode) -> Result<CSSNode> {
30 Ok(ast)
32 }
33}
34
35impl JSRuntime {
36 pub fn new() -> Result<Self> {
38 Ok(Self {})
39 }
40}
41
42#[cfg(test)]
43mod tests {
44 use super::*;
45
46 #[test]
47 fn test_js_bridge_creation() {
48 let bridge = JSBridge::new();
49 assert!(bridge.is_ok());
50 }
51}