{"_id":"hamlet","_rev":"25-8ecf796dd76f91b9e28bbe13318757cf","name":"hamlet","description":"Hamlet template engine","dist-tags":{"latest":"0.3.3"},"versions":{"0.0.0":{"name":"hamlet","description":"Hamlet template engine","version":"0.0.0","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"./hamlet.js","bin":{"jade":"./bin/jade"},"dependencies":{},"devDependencies":{"coffee-script":"*"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"cat hamlet.coffee | coffee -csb > lib/hamlet.js && coffee -cb test.coffee && node test.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile":"cat hamlet.coffee | coffee -csb > lib/hamlet.js && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"_id":"hamlet@0.0.0","dist":{"shasum":"cb25e0cf33582e1bce1ef863aeb0ef3d000f550e","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.0.0.tgz","integrity":"sha512-ZJ1rz2jBoKNF3yz3C6RKLBymzilLd0wsDH4kJsnt/cKavp4UkComnYj8hX3ybs4jY94+w7jNnbmX40WM9clVTA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGo0KJORkRZw/prPssza3dTQcPGprR810NJQTd/7o0QCAiEAoiTuRUCy06Tx0D44EO7aCP3wQ4+/UVnQ6a5gJpUAL1s="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}]},"0.1.0":{"name":"hamlet","description":"Hamlet template engine","version":"0.1.0","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"./hamlet.js","bin":{"hamlet":"./bin/hamlet"},"dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"cat hamlet.coffee | coffee -csb > lib/hamlet.js && coffee -cb test.coffee && node test.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile":"rm -f hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"_id":"hamlet@0.1.0","dist":{"shasum":"b970fafb9291e3268634fa45f922b395bcff2fbb","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.1.0.tgz","integrity":"sha512-Oc8zsy3PWHgW4xfQK+5QU7pGkyZARRPY33XphFOHQ3nRAc+6yrze49XQd5OYQu5BgpxZV72oSQFKXIvZblB/1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPEmgOZiBSR8K+4VrHu5TL6dT9rksBG4fyti+IKUTZ3QIhAMyLE5zt/maKpGAC2sddYDeB0uAVxXU76DbZPvVzuAFR"}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}]},"0.1.1":{"name":"hamlet","description":"Hamlet template engine","version":"0.1.1","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"./hamlet.js","bin":{"hamlet":"./bin/hamlet"},"dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"cat hamlet.coffee | coffee -csb > lib/hamlet.js && coffee -cb test.coffee && node test.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile":"rm -f hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"_id":"hamlet@0.1.1","dist":{"shasum":"1211a65b2327f566bdeb7ae41ad4cffc1c0829e4","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.1.1.tgz","integrity":"sha512-DuZIsxy/qwx0mLwmZyC13Fjw6Svt6yO1zhU1nSPMcWFe00mqRoH+2D9rDxYFCxQmh/eEvyiaGjt828fOqENMIw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+xC62uVeYOS/V9UwfJ0F06BcwJiXkWraVxvucOXzWyQIhAOVCCF98v+Ufto72e23YwMlQ6W2X9JN3YCrZg28ERHsc"}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}]},"0.1.2":{"name":"hamlet","description":"Hamlet template engine","version":"0.1.2","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"./hamlet.js","bin":{"hamlet":"./bin/hamlet"},"dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"rm -f lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js && coffee -cb test.coffee && node test.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile":"rm -f hamlet.js lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"_id":"hamlet@0.1.2","dist":{"shasum":"0d1f98f6ab0f4cd16d6e6c4ab196c0dc7037e294","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.1.2.tgz","integrity":"sha512-3vqRD+bT2MqhR3je0yGANQBxqwtVKdmRmFGyBskNp6sIorr6nD0r3vNsA0yie9ILvDAl5kitHyVcNrnizfE7cQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQifR/W0ptsNq/cx1s+39HYFXXcK1jx+DhyAHrLF/D0AiEA1zUpuscXVBSZpknLkwUB3x5IIa1o/EzQDeo8EnqJWfM="}]},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}]},"0.1.3":{"name":"hamlet","description":"Hamlet template engine","version":"0.1.3","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"./hamlet.js","dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"rm -f lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js && coffee -cb test.coffee && node test.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile":"rm -f hamlet.js lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"_id":"hamlet@0.1.3","dist":{"shasum":"5c82e970622a20d821cd8921ace4a9c4cf32a326","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.1.3.tgz","integrity":"sha512-CEZxn6ioBcMIL4vGBWP6uCrk8KGD447Qge0yhWGpq7URou8az5MKFzI2p3KZaI0VhOUGcPyYofppZKrXCv5KAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFFaOdJf84ApKIOkDD2HaQ4Wnjgx+XuozXyvBV2woQhZAiBgMCewJzOMQGjhhSPp/TldkMqXQeo3hF9u28AfxpOyHQ=="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}]},"0.2.0":{"name":"hamlet","description":"Hamlet template engine","version":"0.2.0","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"./hamlet.js","dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"npm run compile-hamlet && rm -f test.js && coffee -cb test/test.coffee && node test/test.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile-hamlet":"rm -f hamlet.js lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js ","compile":"npm run compile-hamlet && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"_id":"hamlet@0.2.0","dist":{"shasum":"5f4511099658f3206fa9d3e6d8b3a76de77d1049","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.2.0.tgz","integrity":"sha512-McKBgqLImKgBuE13Dh4LzBz7btpd68hbEqRhYFj5KezNGoYSzaUan6EcD2H5ywnwPK5oTfS2P9NKVqmTr8fljg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC99aCLg8kgJcaSGFTQycZCiA3DhiVH9bjqtM9NNjkhvQIhAPU4FCM6XEplv3WXruFH1GvosOBmXfjnLOTBUuji0GZz"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}]},"0.2.1":{"name":"hamlet","description":"Hamlet template engine","version":"0.2.1","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"./hamlet.js","dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"npm run compile-hamlet && rm -f test.js && coffee -cb test/test.coffee && node test/test.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile-hamlet":"rm -f hamlet.js lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js ","compile":"npm run compile-hamlet && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"_id":"hamlet@0.2.1","dist":{"shasum":"1bed7a3c021508ad41310ebdeeede654933dba71","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.2.1.tgz","integrity":"sha512-uWTFqiZ+YldKEDrmsSN5SfD4MRJkxjGTENrolcxMEKtIJ7h1VgiEJCcoAoAKCQ9lRz7IYU1KwiBVkTOKM7WtTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5s1zDqXYOz/XDJusdHW7XHkMRCEYn4V3S9C262xn7NgIhAPuboa4YovNA4PPRGikS4pbpIE+KLV/Of4LRt/5pHUA8"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}]},"0.3.0":{"name":"hamlet","description":"Hamlet template engine","version":"0.3.0","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"./hamlet.js","dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"npm run test-browser && npm run test-express","test-browser":"npm run compile-hamlet && rm -f test/test.js && coffee -cb test/test.coffee && node test/test.js && echo 'PASS' || echo 'FAIL'","test-express":"npm run compile && rm -f test/express.js && coffee -cb test/express.coffee && node test/express.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile-hamlet":"rm -f hamlet.js lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js ","compile":"npm run compile-hamlet && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"_id":"hamlet@0.3.0","dist":{"shasum":"9e058845927f50b57fc6dc3bd908a4b85a80a065","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.3.0.tgz","integrity":"sha512-s37DcigiHjDaVbTH4mgkyoe0nNPUJLGpXC+4Z2NAfoOgh0qtEMWYqqin80pwqFDyfu+77axkkCWo+dee7ztGtA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgQiylczN6N+VURC8iSklpSEnl9uFBtd7KJfdgQ1HcZAIgeP08Y5Jxrq/nelUH5HyNLDJFT9B73okH/T9PgAGR8tI="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}]},"0.3.1":{"name":"hamlet","description":"Hamlet template engine","version":"0.3.1","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"hamlet","dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"npm run test-browser && npm run test-express","test-browser":"npm run compile-hamlet && rm -f test/test.js && coffee -cb test/test.coffee && node test/test.js && echo 'PASS' || echo 'FAIL'","test-express":"npm run compile && rm -f test/express.js && coffee -cb test/express.coffee && node test/express.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile-hamlet":"rm -f hamlet.js lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js ","compile":"npm run compile-hamlet && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"homepage":"https://github.com/gregwebs/hamlet.js","_id":"hamlet@0.3.1","_shasum":"e158c2ea20c8bfac664abd8d386005c3962d9bdb","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}],"dist":{"shasum":"e158c2ea20c8bfac664abd8d386005c3962d9bdb","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.3.1.tgz","integrity":"sha512-FMGKKc5eq2rbcWD9ftij7nngm9sXptMZV8F2LvECMbYM2odpBXZUjl+GO8AKYIaDrBHzEPi4wT3ckG9PO3q+7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkDDF6f0ud6XQy1ZzyrAksdZZ81BovU9eRozi6WMWbBAiAeIiyKOJ/laXi9OlRoJfRykQUrtw0eOgyIXyBgvarAZg=="}]}},"0.3.2":{"name":"hamlet","description":"Hamlet template engine","version":"0.3.2","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"hamlet","dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"npm run test-browser && npm run test-express","test-browser":"npm run compile-hamlet && rm -f test/test.js && coffee -cb test/test.coffee && node test/test.js && echo 'PASS' || echo 'FAIL'","test-express":"npm run compile && rm -f test/express.js && coffee -cb test/express.coffee && node test/express.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile-hamlet":"rm -f hamlet.js lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js ","compile":"npm run compile-hamlet && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"homepage":"https://github.com/gregwebs/hamlet.js","_id":"hamlet@0.3.2","_shasum":"d8c5ace73ec0857ba96bbd88676c928b2cff8bd1","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}],"dist":{"shasum":"d8c5ace73ec0857ba96bbd88676c928b2cff8bd1","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.3.2.tgz","integrity":"sha512-EzQtAGA5M8Mb1jIwTZbu+JKFjneMlN12c4A2XB3FJrzGENAYAvWv3UeOedHFisJVcpQKOQ1vck7w4ldO01Jbiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxo3ABfjArTVkfjR7GacMmSH+HiE/mfmMoUcI5A0g+0wIhAOiYntXAyFJys4NjgG9RgG7636fpHekb1JkMQ9DqV9rR"}]}},"0.3.3":{"name":"hamlet","description":"Hamlet template engine","version":"0.3.3","author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"main":"hamlet","dependencies":{},"devDependencies":{"coffee-script":"*","commander":"1.3.2","mkdirp":"0.3.x","monocle":"0.1.50"},"component":{"scripts":{"hamlet":"hamlet.js"}},"scripts":{"test":"npm run test-browser && npm run test-express","test-browser":"npm run compile-hamlet && rm -f test/test.js && coffee -cb test/test.coffee && node test/test.js && echo 'PASS' || echo 'FAIL'","test-express":"npm run compile && rm -f test/express.js && coffee -cb test/express.coffee && node test/express.js && echo 'PASS' || echo 'FAIL'","prepublish":"npm prune && npm run build","build":"npm run compile","compile-hamlet":"rm -f hamlet.js lib/hamlet.js && cat hamlet.coffee | coffee -csb > lib/hamlet.js ","compile":"npm run compile-hamlet && cat lib/hamlet.js express.js >> hamlet.js"},"browser":{"./lib/hamlet.js":"./lib/hamlet.js"},"bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"homepage":"https://github.com/gregwebs/hamlet.js","_id":"hamlet@0.3.3","_shasum":"f1c8af2e4deeaa4766b2886e67f964c6c897db74","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"gregweber","email":"greg@gregweber.info"},"maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}],"dist":{"shasum":"f1c8af2e4deeaa4766b2886e67f964c6c897db74","tarball":"https://registry.npmjs.org/hamlet/-/hamlet-0.3.3.tgz","integrity":"sha512-N6aUJtoNwxWN0dYWso1/8CqKbtlaun7uHhJ+hTg6Y1u6I2a1KWoc8Q4Tlh9y+rbe/7gb9btDI3Ft7gEj3AFxdw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHx0o3RKzKtLgNWuWujLHX2unH3W0LQiuePr5be5U9UEAiEAx906mz0Zhzdc3y+4d80/T/XbuTa050E57Boo+8f3OOA="}]}}},"readme":"# Hamlet Html Templates for javascript\n\nHamlet is just html without redundancies.\nThe big deal is that it uses your white space to automatically close tags.\nYou already properly indent your tags right?\nComputers are supposed to automate things - lets have them close tags for us.\n\nThis is similar in concept to HAML or jade. However, HAML and jade abandons html syntax without justification. If we just apply significant white-space and a few other html-compatible shortcuts to regular HTML, we can get the benefit without the drawback. Designers that have used the Haskell version of Hamlet have really liked it.\n\nI created this with client-side templates in mind, but it works server side with node.js\n\n# Syntax\n\n``` html\n<body>\n    <p>Some paragraph.\n    <ul>\n        <li>Item 1\n        <li>Item 2\n```\n\nThat hamlet is equivalent to:\n\n``` html\n<body>\n  <p>Some paragraph.</p>\n  <ul>\n    <li>Item 1</li>\n    <li>Item 2</li>\n  </ul>\n</body>\n```\n\nLets show some interpolation and CSS shortcuts:\n\n``` html\n<.foo>\n  <span#bar data-attr=#{foo}>baz # this is a comment\n```\n\nThat template invoked with: `Hamlet(template, {foo:'f'})`.  generates:\n\n``` html\n<div class=\"foo\"><span id=\"bar\" data-attr=\"f\">baz </span></div>\n```\n\nThe library currently does not try to pretty print the resulting html, although it wouldn't be hard to do.\nNote the interpolation `#{var}}`. You can use other interpolation styles by changing the RegExp Hamlet.templateSettings.interpolate.\nYou can put any javascript you would like in the interpolation.\n\n## Good error messages\n\nUnlike Jade and many other templating options, Hamlet will tell you the line on which a javascript interpolation error occurred in your template. This does make it less powerful: read the next section.\n\nNote that Hamlet will pretty much parse about anything and spit it out as HTML so there aren't parsing syntax errors to deal with. In practice there are very few syntax issues because you already know hamlet: it is just HTML!.\n\n## Important: hamlet.js does not have a construct for conditional html (an if statement)\n\nThink of hamlet.js as your HTML pre-processor, but don't use it by itself to server 100% of your templating needs. hamlet.js works well when paired with something like AngularJS.\n\nGood use cases for hamlet.js\n* server-side (nodejs) usage: a template language for client-heavy apps. hamlet.js is used to stick a few values in server side, but AngularJS is used for most actual logic client-side.\n* client-side usage: client heavy apps that use hamlet.js just as an html pre-processor. A client-side AngularJS template can be written more concisely and safely with hamlet.js. It is first expanded through hamlet.js\n* client-side usage: client light applications that just want to stick a few values into their client-side html, but don't need template logic.\n\nBad use cases\n* server-side (nodejs) usage: template langauge where all template logic is performed on the server\n* client-side usage: a client-heavy app where all logic is encoded in hamlet.js\n\n\n### interpolation\n\nhamlet.js consists of the core hamlet language interspersed with javascript evaluation via `#{js}`.\nThe only thing you can place in the javascript evaluation is something that produces a String.\nThere is no way to have an `if` that may include some html if true.\n\nhamlet.js is designed for client-heavy apps that are using something like AngularJs on the client-side.\n`#{}` is for simple server-side templating, and an angular user can still use `{{}}` for the client-side (although ng-bind is often a better choice)\n\nOne benefit of the limited js evaluation is that hamlet can recover very good error messages when used on the server side (by evaluating each line of the template one-by-one). Having conditionals (as jade does by default for example) ruins error message reporting because the entire template must be evaluated at once.\n\n## Overview\n\nIt is just HTML! But redundancies are taken away\n\n* quoting attributes is not required unless they have spaces\n* Indentation is used to automatically close tags.\n\nThis loosely follows the original Haskell [Hamlet](http://www.yesodweb.com/book/templates) template language that I helped design. This implementation is simpler because it is invoked at runtime, just does a simple javascript eval, and has no concept of type insertion - this includes no html escaping. There is a [fork of this library](https://github.com/ajnsit/hamlet.js) that uses Haskell Hamlet style interpolation.\n\n## Usage\n\nThis uses the same style and code as the template function from underscore.js\n\n``` js\nrendered_html = Hamlet(template, object)\n```\n\nor\n\n``` js\npre_compiled_template = Hamlet(template)\nrendered_html = pre_compiled_template(object)\n```\n\nOr you can avoid all variable assertion and just expand hamlet with:\n\n``` js\nHamlet.toHtml('<p>') // \"<p></p>\"\n```\n\n### nodejs\n\nvar hamlet = require('hamlet').hamlet\n\n``` js\nhamlet('<p>') // \"<p></p>\"\n```\n\nThere is also a command line program `bin/hamlet.js`. It is not listed in package.json due to some weird install issues.\nSimilarly, the dependencies for that program are listed in the devDependencies.\n\n### Meteor\n\nThere is an [atmosphere package](https://github.com/maxcan/meteor-hamlet-handlebars).\n\n### Express\n\nIt should work with the '.hamlet' extension.\n\n## Layouts\n\nThis uses the filesystem so it only works for nodejs.\nJust add `layout path/to/layout` at the very top of your template.\nIn your layout file, use the special content variable `#{content}` to include the inner template content.\n\nSince Hamlet is designed for client-heavy usage there are no plans to support partials directly.\n\nYou can of course manually create layouts or partials by first rendering an inner template and setting that as a local variable in the outer template.\n\n## class/id shortcuts\n\nThe CSS-based shortcuts are originally taken from the HAML markup language.\nA '#' indicates an id, and a '.' indicates a class. You can add as many classes this way as you like.\n\n## Comments\n\nComments begin with a '#' character.\nWhen the template is compiled they are removed, not converted to html comments.\nThere is no support for html comments.\n\n## White space\n\nUsing indentation does have some consequences with respect to white space. This library is designed to just do the right thing most of the time. This is a slightly different design from the original Haskell implementation of Hamlet.\n\nA closing tag is placed immediately after the tag contents. If you want to have a space before a closing tag, use a comment sign `#` on the line to indicate where the end of the line is.\n\n``` html\n<b>spaces  # 2 spaces are included\n```\n\n``` html\n<b>spaces  </b>\n```\n\nWhite space is automatically added *after* tags with inner text. If you have multiple lines of inner text without tags (not a common use case) they will also get a space added. If you do not want white space, you point it out with a `>` character, that you could think of as the end of the last tag, although you can still use it when separating content without tags onto different lines. You can also use a `>` if you want more than one space.\n\n``` html\n<p>\n  <b>no space\n  >none here either.\n  >  Two spaces after a period is bad, just use one!\n```\n\n``` html\n<p><b>no space</b>none here either.  Two spaces after a period is bad, just use one!</p>\n```\n\n## Closing bracket\n\ncurrently  the '>' character is optional if there is no inner text on the same line. In the future this will be changed to be required so that tag attributes can span multiple lines.\n\n## Limitations\n\nHamlet just uses a simple eval interpolation.\nThis works well for me on an AngularJS project where AngularJS is actually doing the templating.\nYou might be able to use Hamlet to pre-process for another templating system.\n\n# Development \n\nRequires Coffeescript, although if you are only comfortable changing js I can easily port it to the Coffeescript file.\n\n## Testing\n\nThe test suite is pretty good now. I create a regression test for every issue I notice.\n\n    npm test\n\nYou can run the tests in a browser by opening test/test.html and looking at the console.\n\nTest cases can be ported from the [Haskell Hamlet test suite](http://github.com/yesodweb/hamlet/hamlet/test/main.hs)\n\n\n## Converting from jade\n\nIf there are no variables interpreted in your jade, you can compile it down to html\n\n    > jade.compile('test(attr=\"val\") text', {debug:false, compileDebug:false, pretty:true, client:true})()\n    '\\n<test a=\"val\">wtf</test>'\n\nTODO: If there are variables, is there a way to set every variable value to `#{variable}` ?\n\n## Converting from html\n\nOne of the great things about Hamlet is that for a small amount of HTML, you can just delete the closing tags.\n\nThere is a Haskell tool `html2hamlet` (install Haskell, then cabal install html2hamlet)\n\n    ❯ echo '\\n<test a=\"val\">text</test>' | ./cabal-dev/bin/html2hamlet\n    !!!\n    <test a=\"val\">\n      text\n\n## Thanks\n\nI wrote the parser code, but the template insertion is stolen from [micro-template](https://github.com/cho45/micro-template.js) and express integration from jade.\n","maintainers":[{"name":"gregweber","email":"greg@gregweber.info"}],"time":{"modified":"2022-06-18T18:48:49.698Z","created":"2013-07-21T04:25:31.429Z","0.0.0":"2013-07-21T04:25:33.292Z","0.1.0":"2013-07-21T17:22:32.389Z","0.1.1":"2013-07-21T17:46:16.774Z","0.1.2":"2013-07-21T18:08:26.514Z","0.1.3":"2013-07-21T18:44:42.336Z","0.2.0":"2013-07-22T16:45:35.950Z","0.2.1":"2013-07-30T18:04:02.223Z","0.3.0":"2013-07-30T18:10:05.909Z","0.3.1":"2014-06-04T18:39:53.719Z","0.3.2":"2014-06-04T20:12:22.181Z","0.3.3":"2014-06-04T20:26:26.660Z"},"author":{"name":"Greg Weber","email":"greg@gregweber.info"},"repository":{"type":"git","url":"git://github.com/gregwebs/hamlet.js"},"homepage":"https://github.com/gregwebs/hamlet.js","bugs":{"url":"https://github.com/gregwebs/hamlet.js/issues"},"readmeFilename":"README.md"}