0.0.6 • Published 3 years ago

hussar v0.0.6

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

Goals of this framework

  • Pure JavaScript only, everything is a valid JavaScript code
  • Produce small output code
  • Produce fast output code
  • Currently no external dependencies and keeping it that way
  • No need for additional transpillers or compillers, only a bundler necesarry

NOTE

This is Work In Progress (WIP), anything might be subject of change at any time.

At current stage it starts to be usable:

  • you can create components
  • you can create and attach styles
  • you can do two-way bindings
  • you can use efficient lifecycle events
  • there are included libraries with usefull generic JS functionalities

Examples:

"static" components

import { body, div, span } from 'hussar/core.mjs';

// === DATA ===
const list = [
    {name: "John", surname: "Kowalski"},
    {name: "Andrew", surname: "Nowak"}
];

// === STYLES ===
const surnameStyle = style({
    text: {
        color: 'blue'
    }
});

// === COMPONENTS ===
const nameSurname = ({name, surname}) =>
    div(
        'Name and surname: ', name, span(surnameStyle, surname)
    );

const namesList = list =>
    div(
        ...list.map(nameSurname)
    );

// === MAIN ===
body(
    namesList(list)
);

Documentation

Documentation is available here (also a VERY WIP version at the moment): https://danielmazurkiewicz.github.io/hussar/

Documentation itself uses this framework so for now it can give you a glympse of how to use it. Look especially at these files:

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago