Expand description
TCSS WebAssembly Bindings
This module provides WebAssembly bindings for the TCSS compiler, allowing it to be used in web browsers and Node.js environments.
§Example (JavaScript)
import init, { compile_tcss } from './tcss_wasm.js';
await init();
const tcss = `
@var primary: #3498db
.button:
background: primary
padding: 16px
`;
const css = compile_tcss(tcss);
console.log(css);Functions§
- compile_
tcss - Compile TCSS source code to CSS
- compile_
tcss_ minified - Compile TCSS source code to minified CSS
- compile_
tcss_ with_ options - Compile TCSS source code to CSS with custom options
- init
- Initialize the WASM module
- parse_
tcss - Parse TCSS source code and return the AST as JSON
- validate_
tcss - Validate TCSS source code without generating CSS