free-radical

0.0.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i free-radical

      Weekly Downloads

      1

      Version

      0.0.0

      License

      MIT

      Unpacked Size

      2.22 kB

      Total Files

      3

      Last publish

      Collaborators

      • richytong