0.0.31 • Published 1 year ago

eliora v0.0.31

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

License: Apache-2.0 npm version build status

TypeScript

Eliora

Eliora is a front-end JavaScript framework for building browser applications. It is largely inspired by Aurelia framework for its syntax and it is designed to work with Vite.

Getting started

To setup a new project, just setup a ViteJS vanilla typescript project and add dependency to Eliora framework:

npm create vite@latest my-project -- --template vanilla-ts
cd my-project
npm install
npm i eliora --save

To bootstrap Eliora, update main.ts with this content :

import { Eliora } from "eliora";

new Eliora()
    .registerTemplateModules(import.meta.glob("/src/**/*.html", { as: 'raw' }))
    .register(import("./app-component"));

Then, create the app component, you'll need a app-component.ts...

// app-component.ts
export class AppComponent {
    welcome: string = "Welcome to Eliora";
    name: string = "";
}

...and app-component.html

<!-- app-component.html -->
<form>
  <label>
    <span>What is your name?</span>
    <input value.bind="name">
  </label>
</form>

<p if.bind="name">${welcome}, ${name}!</p>

Finaly, add your component in your index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite + TS + Eliora</title>
  </head>
  <body>
    <script type="module" src="/src/main.ts"></script>
    <app-component />
  </body>
</html>
0.0.30

1 year ago

0.0.31

1 year ago

0.0.29

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago