0.0.0 • Published 4 years ago

collagen v0.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Ardra

Declarative web generator

const { pipe, get } = rubico

const { Div, Section, Span, H1, H2, H3, H4, P, Button } = ardra

const makeRequest = fetch('https://jsonplaceholder.typicode.com/todos/1')

const root = Div([
  H1('hey'),
  Section([
    P('yo'),
    Button('click me', {
      onClick: pipe([
        makeRequest,
      ]),
    }),
  ]),
  Section(
    Div('ayo', {
      style: get('divStyle'),
    }),
  ),
]) // function

ardra.render(root, document.body)({
  divStyle: { backgroundColor: 'pink' },
})

Principles

  • vanilla JS, no transpiling
  • use latest web technologies
  • separate environments by concern

Scope

dev -> ardra -> WebAPIs

Installation

> npm i --save ardra

Initialization

npx ardra index.js // outputs html to the console