Files
ruff/index.html
Charlie Marsh a716cd1989 Compile for WASM
- wasm-pack build --target web
- rm -rf demo/src/pkg && cp -r pkg demo/src/pkg
- npm run dev
2022-09-21 18:28:50 -04:00

17 lines
286 B
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8"/>
<title>hello-wasm example</title>
</head>
<body>
<script type="module">
import init, {check} from "./pkg/ruff.js";
init().then(() => {
console.log(check("if (1, 2): pass"));
});
</script>
</body>
</html>