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

Beako.js

What is Beako.js?

Beako.js is web component tools with Data Binding, Template Engine and Virtual DOM.

You can experience single page application development with just a web browser.

She support Web browsers and Deno.

Examples

Glitch Examples

Usage

Beako.js use ES Modules from jsDelivr.

CDN

<!DOCTYPE html>
<meta charset="UTF-8">
<body>Loading...</body>
<script type="module">
  import { watch, mount } from 'https://cdn.jsdelivr.net/gh/ittedev/beako@0.12.0/beako.js'

  const state = watch({
    count: 1
  })

  setInterval(() => { state.count++ }, 1000)

  mount(document.body, `Counter: {{ count }}`, state)
</script>

Deno

deno install -fA https://deno.land/x/beako_cli@0.1.1/beako.ts
import { watch, mount } from 'https://deno.land/x/beako@0.12.0/mod.ts'

const state = watch({
  count: 1
})

setInterval(() => { state.count++ }, 1000)

mount(document.body, `Counter: {{ count }}`, state)

Build:

beako build script.ts --outdir=public

To Import it into html:

<!DOCTYPE html>
<meta charset="UTF-8">
<body>Loading...</body>
<script type="module" src="script.js"></script>