Giter VIP home page Giter VIP logo

mini-js's Introduction

mini-js

It is javascript framework for frontend development heighly inspired by Vue JS. I am developing it just to learn and understand JS and its framework more, it is not meant to be used in production. Check out a demo TODO app here

features

Mini JS has features of modern JS frameworks, here are some of the features -

  • Virtual Dom- A lightning fast virtual dom which with a good diff algorithm for fast partial rerender.
  • Two way data binding- As soon as data gets change it will reflect in the ui.
  • Native Directives- such as m-on (example), m-for (example), m-if (example), m-literal:class (example) etc.
  • Router- for navigation between pages(routing)

installation

To use it you can install using npm install --save mini-js or use this CDN https://cdn.jsdelivr.net/npm/mini-js/build/mini.min.js

uses

html element

Mini needs an element in which it can mount the template or it which it can operate

<body>

<div id='test_app'>
  
  <p> {{best_fruit}} is the best fruit in the world </p>
  <button m-on:click="change_best_fruit()" > change best fruit in the world <button>

<div>

</body>

initialize app

var app = new Mini({
    
    el: '#test_app',
    data: {
      
      best_fruit: 'mango',
      fruits: ['apple', 'banana', 'berry', 'orange', 'cherry']
      
    },
    methods: {
    
      change_best_fruit: function(){
      
        var index = Math.ceil(Math.random()*5);
        this.best_fruit = this.fruits[index];
      
      }
    
    
    }
    
});

more examples will be added soon.

mini-js's People

Contributors

aadilhasan avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

nirikshan 00mjk

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.