Skip to main content
Deno 2 is finally here 🎉️
Learn more

Aleph.js: The Full-stack Framework in Deno.

Aleph.js Compiler

The compiler of Aleph.js written in Rust, powered by swc and parcel-css.

Usage

import { transform } from "https://deno.land/x/aleph_compiler@0.3.0/mod.ts";

const code = `
import { useState, useEffect } from "react"

export default App() {
  const [msg, setMsg] = useState("...")

  useEffect(() => {
    setTimeout(() => {
      setMsg("world!")
    }, 1000)
  }, [])

  return <h1>Hello {msg}</h1>
}
`

const ret = await transform("./app.tsx", code, {
  importMap: {
    imports: {
      "react": "https://esm.sh/react@18",
    }
  }
  jsxImportSource: "https://esm.sh/react@18",
  isDev: true
})

console.log(ret.code, ret.map)

Development Setup

You will need rust 1.56+ and wasm-pack.

Build

deno run -A build.ts

Run tests

cargo test --all