Escribí HTML como si fuera JS
Go to file
Cat /dev/Nulo 8ac446d274 0.0.9 2023-03-31 20:21:36 -03:00
.gitignore init 2022-12-20 17:53:19 -03:00
.npmrc init 2022-12-20 17:53:19 -03:00
html.ts escapar html 2023-03-31 20:21:36 -03:00
package.json 0.0.9 2023-03-31 20:21:36 -03:00
pnpm-lock.yaml escapar html 2023-03-31 20:21:36 -03:00
readme.md readme 2022-12-20 17:57:09 -03:00
tsconfig.json init 2022-12-20 17:53:19 -03:00

readme.md

html.js

Escribí HTML en JS sin JSX.

Instalar

npm config set @nulo:registry https://gitea.nulo.in/api/packages/nulo/npm/
npm add @nulo/html.js

Uso

import {render, h1, doctype, metaUtf8, meta, link} from '@nulo/html.js'

const head = [
  doctype(),
  metaUtf8,
  meta({ name: "viewport", content: "width=device-width, initial-scale=1.0" }),
  link({ rel: "stylesheet", href: "style.css" }),
]

const html = render(
  ...head,
  h1("Hola mundo!")
)