Installation
Get started with PawaJS in minutes. Choose the method that best fits your project needs.
CDN (Quick Start)
The fastest way to try out PawaJS is to use the CDN link directly in your HTML file. No build step required.
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app">
<div state-count="0">
<span>@{count.value}</span>
<button on-click="count.value++">increase</button>
</div>
</div>
<script type="module" src="https://cdn.jsdelivr.net/npm/pawajs@{curentversion}/cdn/index.js"></script>
<script type="module">
//the cdn expose pawajs utilities to window ($pawa)
window.$pawa.pawaStartApp(document.getElementById('app'));
</script>
</body>
</html>
NPM
For production applications, we recommend installing PawaJS via NPM and vite (optional).
bash
npm install pawajs
app.js
javascript
import { pawaStartApp } from "pawajs";
//set dev errors log from the runtime
__pawaDev.tool=true // must be removed before production
pawaStartApp(document.getElementById('app'));