$ npm install -g htmlkupPipe it in, it pipes it out.
$ echo '<html></html>' | htmlkuphtml()$ echo '<html>
<head>
<link type="text/css" href="/css/my.css" />
<script type="text/javascript" src="/js/my.js"></script>
<title>Title</title>
</head>
<body>
<div>Text</div>
<div>
<a href="/">somewhere</a><br/>
</div>
</body>
</html>' | htmlkuphtml ->
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"
br()$ htmlkup < your.html > your.coffeehmtlkup exports just one function. Pass in html, it returns coffeescript
htmlkup = require 'htmlkup'
html = '<p>Hi!</p>'
coffeekup = htmlkup(html)p "Hi!"You can paste in your HTML and it'll output coffeescript.
Converts HAML into HTML, HTML into coffescript (coffeekup), and bi-directional conversion of coffeescript and javascript.
$ vows