Quick start
pulsar create my-app # default: TypeScript UI (templates: default, qml, windows, tray)
cd my-app
pulsar dev # run with hot reload
my-app looks like this:
my-app/
pulsar.json # app manifest: id, windows, entry point
main.ts # UI + state + events, all in TypeScript
assets/icon.png
package.json
tsconfig.json
main.ts:
import { App, bind, Button, Column, Header, Text } from "pulsar"
const app = new App()
app.store.set("count", 0)
app
.window("main")
.render(() =>
Column(
{ fill: true },
Header({ title: "Hello from Pulsar" }),
Text({ size: 20, text: bind(() => `Count: ${app.store.get("count")}`) }),
Button({ onClick: () => app.store.set("count", (app.store.get("count") as number) + 1) }, "+1"),
),
)
app.run()
No QML files. pulsar.json supplies the window defaults, so new App() needs
no arguments. Advanced users can switch a window to QML with "ui": "ui/main.qml"
and start from pulsar create my-app --template qml.