0.0.17 • Published 6 years ago

jagwah v0.0.17

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Jagwah

Travis CI badge Codeclimate maintainability Greenkeeper badge Bundlephobia minified badge Bundlephobia minified zipped badge

Jagwah (pronounced /dʒægwæh/) is a tiny web application framework built with hyperHtml & Typescript.

Getting Started

Install with yarn or npm​

yarn add jagwah

Import and start using

import { Jagwah } from 'jagwah';
​
const jagwah = new Jagwah({
  providers: [ ... ],
  templates: [ ... ]
});

jagwah.start();

Documentation

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

Overview

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.

Example

Below is a really simple example of jagwah, it uses a single Template without Providers or Routes.

main.ts

import { Jagwah, Selector } from 'jagwah';
​
const jagwah = new Jagwah();
​
@Selector('#hello-world')
class HelloWorldTemplate {
  constructor() {}
  public render(render: Jagwah.Template.render) {
    return render`
      <h1>Hello World</h1>
    `;
  }
}
​
jagwah.Template(HelloWorldTemplate);
​
jagwah.update();

main.js (javascript alternative)

import { Jagwah } from 'jagwah';
​
const jagwah = new Jagwah();
​
function HelloWorldTemplate() {}
HelloWorldTemplate.$selector = '#hello-world';
HelloWorldTemplate.prototype.render(render) {
  return render`
    <h1>Hello World</h1>
  `;
}
​
jagwah.Template(HelloWorldTemplate);
​
jagwah.update();

index.html

<body>
  <div id="hello-world"></div>
</body>

result.png hello world with jagwah

Credits

All of the really hard work was done by WebReflection and the contributors of hyperHtml.

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago