mbylstra / html-to-elm

An online tool for converting HTML to elm-html. Go to
http://mbylstra.github.io/html-to-elm/
395 stars 23 forks source link

Making a command line tool for html-to-elm #23

Open rajatvijay opened 6 years ago

rajatvijay commented 6 years ago

Hey, any thoughts on making a command line tool so that it can be used like babel?

nivertech commented 6 years ago

@rajatvijay did you found a CLI version of html2elm?

mbylstra commented 6 years ago

Hi, I don't have any plans to do this, but I think it's certainly quite achievable. Here is a rough guide of how to do it (if anyone else is willing to give it a shot):

The parser is pure Elm, so there's no need to run it through Electron or headless Chrome or anything like that. Other elm to html projects I've seen leverage the browser's built-in html parser, which doesn't make them very portable.

groteck commented 6 years ago

As a first step into this path I created this PR #24