1.0.26 • Published 3 years ago

axino v1.0.26

Weekly downloads
3
License
GPL
Repository
github
Last release
3 years ago

About Axino

Typescript component library, alternative to frameworks like Vue, React, Angular for front-end app development. Small footprint. Pure HTML5 / CSS / TS.

Installation (from npm):

npm i axino

Components API documentation (Typescript classes):

https://serge-hulne.github.io/axino-docs

Tutorials:

https://serge-hulne.medium.com/getting-started-with-axino-4584bcdb99ca

https://serge-hulne.medium.com/axino-vs-vue-js-part-1-the-basics-f58872f54022

https://serge-hulne.medium.com/axino-vs-vue-react-angular-d312fdaf9277

https://serge-hulne.medium.com/axino-electron-desktop-app-9bfd8169b661

https://serge-hulne.medium.com/build-a-desktop-calculator-app-with-axino-and-electron-in-one-minute-459c9d29d72d

Usage:

Create a html file (hello.html) to hold the app script:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/picnic">
    <title>Axino2 Hello world example</title>
</head>

<body>
    <!-- for testing *.ts sources, via "parcel index.html" -->
    <script src="hello.ts"></script>
</body>


</html>

Create the Typescript file (hello.ts) which codes the apps, using Axino components:

import { Button } from "axino/button";
import { log } from "axino/core";
import { Label } from "axino/label";
import { Div } from "axino/div";


// Create a basic Div:
var d = new Div(null);
d.appendToApp();
d.vertical();

// Add a label to the Div:
var l = new Label("Clik on B1");
l.appendTo(d);

// Create a Button add to Div:
var b1 = new Button("B1");
b1.appendTo(d);

// Add behaviour to Button b (which acts on label l):
b1.onClick(() => {
    l.setText("<h1>Hello World!</h1>");
    log(l.getText());
});

To test the app:

parcel hello.html

(Parcel bundles the TS files into a single JS file and starts a local server on http://localhost:1234/) Parcel doc : https://parceljs.org/

To build the app:

parcel build hello.html

Testing and building the app using package.json

By adding the following to the package.json scripts section of the app

  "scripts": {
    "test": "parcel index.html",
    "build": "parcel build index.html"
  }

testing and building of the app can be launched as follows:

npm run test

and

npm run build 

respectively.

(C) Serge Hulne, 2020.

1.0.26

3 years ago

1.0.25

4 years ago

1.0.22

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago