Wrapper for the awesome hyperHtml renderer written in Typescript.
npm install jagwah




Jagwah (pronounced /dʒægwæh/) is a tiny web application framework built with hyperHtml & Typescript.
Install with yarn or npm
``bash`
yarn add jagwah
Import and start using
`ts
import { Jagwah } from 'jagwah';
const jagwah = new Jagwah({
providers: [ ... ],
templates: [ ... ]
});
jagwah.start();
`
All of the documentation can be found in the github wiki, it's not perfectly up to date with the latest changes but provides a good overview. Organizing and validating documentation is the focus of minor release 0.1.0.
All examples are stored in the examples branch
Jagwah wraps around hyperHtml to provide a simple API for building web applications with Routes, Templates, Dependency Injection and a few other things. It's intended for use with Typescript but works equally as well with Javascript, not abstracting too far away from core language features.
Below is a really simple example of jagwah, it uses a single Template without Providers or Routes.
main.ts`ts
import { Jagwah, Selector } from 'jagwah';
const jagwah = new Jagwah();
@Selector('#hello-world')
class HelloWorldTemplate {
constructor() {}
public render(render: Jagwah.Template.render) {
return render
;
}
}
jagwah.Template(HelloWorldTemplate);
jagwah.update();
`main.js (javascript alternative)
`ts
import { Jagwah } from 'jagwah';
const jagwah = new Jagwah();
function HelloWorldTemplate() {}
HelloWorldTemplate.$selector = '#hello-world';
HelloWorldTemplate.prototype.render(render) {
return render;
}
jagwah.Template(HelloWorldTemplate);
jagwah.update();
`index.html
`html
`result.png`All of the really hard work was done by WebReflection and the contributors of hyperHtml.