Ezol.js
Installation
npm i --save ezoljs
Description
This library is highly inspired by elm's html + view implementation. Similarly in Ezol, each element is dynamically created to be used as a first class function.
Each element takes 3 arguments:
Example
const Ezol = ; // exampleconst ezol = ;const div nav ul li a = Ezol; // inline styles acceptedconst navStyle = ` background: orange; padding: .5rem;`; const menuStyle = ` align-items: center; display: flex; justify-content: space-between; list-style: none;`; const linkStyle = ` color: #fff; margin-right: 1.5rem; text-decoration: none;`; const brandStyle = linkStyle; // link dataconst links = text: "Ezol" attrs: className: "navbar__menu-item-link active" href: "/" style: brandStyle text: "Fork Me" attrs: className: "navbar__menu-item-link" href: "https://github.com/mdxprograms/ezoljs" target: "_blank" style: linkStyle ; // example eventconst doSomething = { etargetstyletextDecoration = "none";}; // basic view exampleconst appView = ; ezol;
Todos
- migrate code to es6 format
- formalize tests
- update examples in readme
- add elements dictionary to dynamically create all html elements
- add exports