1.0.2 • Published 3 months ago

apajs v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Apă (water, in Romanian) For when you just need a little hydration.

Intro

ApăJS is a minimal library aiming at reducing boilerplate around web components, yet keeping them fairly "vanilla". With its ~3kb (minified, ~1kb gzipped), it provides out-of-the-box:

  • A way of creating web components with a functional approach
  • Automatically add event handlers to DOM elements
  • Automatically store references to the DOM to lower the boilerplate around query selectors
  • First-class support for server-side rendered HTML

Getting started

The easiest way of getting started is via esm. You can import the main functions from there:

import { define, html } from "https://esm.sh/apajs@1.0.2";

define({ tag: "hello-world" }, function () {
  return html`<h1>Hello world!</h1>`;
});

Alternatively, if you want to use npm, npm i apajs.

Documentation is still WIP. If you're super curious and want to test it out, please take a look a the examples directory. There you can find several examples to have a first feel of how the syntax looks like!

1.0.2

3 months ago

1.0.1

5 months ago

1.0.0

5 months ago

0.1.0

6 months ago

0.0.32

6 months ago

0.0.31

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago