Skip to content

Framework for those who would like to stick to JS only (no HTML nor CSS) and produce relatively fast and fairly small sized web apps

License

Notifications You must be signed in to change notification settings

DanielMazurkiewicz/hussar

Repository files navigation

Hussar - Framework for developers that wants to work with JavaScript only

hussar-logo
Framework for those who would like to stick to JS only (no HTML nor CSS)
and produce relatively fast and fairly small sized web apps.

https://danielmazurkiewicz.github.io/hussar/

Submit an Issue

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:

About

Framework for those who would like to stick to JS only (no HTML nor CSS) and produce relatively fast and fairly small sized web apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published