Typescript component library, alternative to frameworks like Vue, React, Angular for front-end app development. Small footprint. Pure HTML5 / CSS / TS.
npm i axino
https://serge-hulne.github.io/axino-docs
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
<!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>
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());
});
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/
parcel build hello.html
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.