elexis/README.md
defaultkavy 74327f8eed publish elexis v0.1
- rename: $AsyncNode -> $Async
- remove Router
- update README.md
2024-04-25 21:11:20 +08:00

1.3 KiB

ElexisJS

TypeScript First Web Framework, for Humans.

ElexisJS is still in beta test now, some breaking changes might happen very often.

What does ElexisJS bring to developer?

  1. Write website with Native JavaScript syntax and full TypeScript development experiance, no more HTML or JSX.
  2. For fluent method lovers.
  3. Easy to import or create extensions to extend more functional.

Installation

  1. Install from npm
    npm i elexis
    
  2. Import to your project main entry js/ts file.
    import 'elexis';
    
  3. Use web packaging tools like Vite to compile your project.

How to Create Element

Using the simple $ function to create any element with node name.

$('a');

This is not jQuery selector! It looks like same but it actually create <a> element, not selecting them.

Fluent method

Create and modify element in one line.

$('h1').class('title').css({color: 'red'})

Build your first "Hello, world!" ElexisJS project

Let's try this in your entry file:

$(document.body).content([
    $('h1').class('title').content('Hello, world!')
])

Extensions

  1. @elexis/router: Router for Single Page App.
  2. @elexis/layout: Build waterfall/justified layout with automatic compute content size and position.