Crate tcss_wasm

Crate tcss_wasm 

Source
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