Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Converts html to coffeekup
branch: master

Merge pull request #4 from webjay/master

New url for html2coffeekup
latest commit 8aeec1cb94
Colin T.A. Gray authored
Failed to load latest commit information.
bin lint fixes
lib check parent length before popping, in case of too many closing tags.
test preserve indent in """ - looks better.
.gitignore ignore npm-debug is no more thus moved to
package.json check parent length before popping, in case of too many closing tags.



$ npm install -g htmlkup

Command line usage:

Pipe it in, it pipes it out.

$ echo '<html></html>' | htmlkup
$ echo '<html>
    <link type="text/css" href="/css/my.css" />
    <script type="text/javascript" src="/js/my.js"></script>
      <a href="/">somewhere</a><br/>
</html>' | htmlkup
html ->
  head ->
    link type: "text/css", href: "/css/my.css"
    script type: "text/javascript", src: "/js/my.js"
    title "Title"
  body ->
    div "Text"
    div ->
      a href: "/", "somewhere"
$ htmlkup < your.html >

Module usage:

hmtlkup exports just one function. Pass in html, it returns coffeescript

htmlkup = require 'htmlkup'

html = '<p>Hi!</p>'
coffeekup = htmlkup(html)
p "Hi!"

Online usage:

html2coffeekup by Jacob Friis Saxberg

You can paste in your HTML and it'll output coffeescript.

haml-html-coffeecup-javascript-coffeescript-converter by Mike Smullin

Converts HAML into HTML, HTML into coffescript (coffeekup), and bi-directional conversion of coffeescript and javascript.


$ vows
Something went wrong with that request. Please try again.