dnikolovv / purescriptify

HTML to PureScript converter.
https://purescriptify.web.app
30 stars 3 forks source link
converter halogen html purescript react

Purescriptify - an HTML to PureScript converter

Try it out


Turns

<section class="a-class">
  <h1>Some heading</h1>
  <p>A paragraph.</p>
</section>

into

module PureScript where

import React.Basic.DOM as R

node0 = R.section
  { className: "a-class"
  , children:
      [ R.h1 { children: [ R.text "Some heading" ] }
      , R.p { children: [ R.text "A paragraph." ] }
      ]
  }

Motivation

I would find various moderate to large HTML snippets online (e.g. Tailwind components) and curse at how tedious they are to rewrite in PureScript. No more.

Supported

Not supported (at least yet)

Contribuing

You're very welcome.