Toy HTML-to-JS converter with both CLI and WASM frontends.
function createMimic() {
const root = document.createElement('div');
const paragraph = document.createElement('p');
paragraph.style.cssText = 'sexy';
const text = document.createTextNode('Hello, world!');
root.appendChild(paragraph);
paragraph.appendChild(text);
return root;
}
-
Convert HTML code stored in the HTML file:
mimicui <path>
-
Convert HTML read from STDIN:
curl https://test.host/1.html | mimicui -
cargo build --target release
wasm-pack build --target web
Output will be put into the pkg/
directory.