Code Monkey home page Code Monkey logo

axino's Introduction

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.

axino's People

Contributors

serge-hulne avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.