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

Minifying javascript on master branch #9

Closed yang-wei closed 8 years ago

yang-wei commented 8 years ago

Hi thanks for this handy tools ! Really good thing.

We all know that Elm compiled to JavaScript to run on browser but you probably don't want it to be recognized as a JavaScript app right?

image

Since you are hosting your app on Github (gh-pages branch) I suggest you use travis to build your gh-pages branch, just like what I did here so that

image

Anyway if you are fine with your approach then feel free to close. I might contribute if you are interestred =)

mbylstra commented 8 years ago

Hi, thanks! Your approach is really good - I definitely have been bummed out that the project shows up as 7% Javascript as the majority of the project is a html parser I wrote from scratch in Elm. It was a gruelling process (as I don't have experience writing parsers) but I got there in the end.

To get the Elm stats up, there's another thing that would need to be done in addition to removing the compiled elm.js from the main branch: I didn't manage to get properly working versions of highlight-js and zeroclipboard from npm or bower, so I just downloaded them and put them in the repo. I think I remember the problem being that zeroclipboard wasn't on npm/bower/github, and that the version of highlight-js that did Elm highlighting was not yet on npm. I'm sure it's possible to install directly from github using npm, or some other method, but by that time I was pretty tired of the project, so I went with the easy option :) I made the actual front end very quickly (and badly) as the majority of the work went into the parser. I'm afraid I don't have the time to revisit this at the moment, but if it interests you at all, I would gladly merge your pull request.

Also, I don't have Travis installed (or a remote Travis build server), but I guess the idea is that you could just run the build.sh script manually when releasing a new version? Oh, and your Elm signals animations are really cool!