0.0.1 • Published 4 years ago

hypert v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Hypert

Hypertext transpiler (early alpha stage, exploratory)

Install

yarn add hypert

Use

import { parse, render } from 'hypert'

const source = '<div>...</div>'
const nodes = parse(source)
const html = render(nodes)

React

Optionally create a React node that renders the HTML.

import React from 'react'
import ReactDOM from 'react-dom'
import { parse, render } from 'hypert'
import { createReactComponent } from 'hypert/react'

const source = '<div>...</div>'
const nodes = parse(source)
const Component = createReactComponent(nodes)

ReactDOM.render(<Component />, document.getElementById('app'))

Develop this library

Install dependencies

yarn

Develop: Watch files; Recompile, type check and test on changes

yarn dev

Build

yarn build

Publish to NPM

npm run release