{"_id":"coffeemugg","_rev":"27-9962105f72e142022dbde7c1e76c3460","name":"coffeemugg","description":"HTML templating with CoffeeScript.","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.1":{"name":"coffeemugg","description":"HTML templating with CoffeeScript.","version":"0.0.1","author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"},"dependencies":{"coffee-script":">= 1.1.2"},"devDependencies":{"jade":"0.13.0","eco":"1.1.0-rc-1","ejs":"0.4.3","haml":"0.4.2","coffeekup":"0.3.0"},"keywords":["template","view","coffeescript","coffeekup"],"main":"./lib/coffeemugg","engines":{"node":">= 0.4.7"},"contributors":[{"name":"Maurice Machado","email":"maurice@bitbending.com"}],"_npmUser":{"name":"jaekwon","email":"jkwon.work@gmail.com"},"_id":"coffeemugg@0.0.1","_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"d8cdae5ee945dddb0da499d83eed45b803e60c52","tarball":"https://registry.npmjs.org/coffeemugg/-/coffeemugg-0.0.1.tgz","integrity":"sha512-eePgMj1Sd7ImuePwfiD3ajyBlLC8F4WD2XNA36ye7BAJQPLFXonMRWhez5p5aUGw8Z/6s+7Y2j7EObf5KtncLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiCKmZXum6/Kj5rXarxDQ1dvJe622EHJw8qF/pXOj4MQIgLMHnMecfgvkNgLYeHC03TV3sm6DPWj0YA8+MRQhfOx4="}]},"maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}],"directories":{}},"0.0.2":{"name":"coffeemugg","description":"HTML templating with CoffeeScript.","version":"0.0.2","author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"},"dependencies":{"coffee-script":">= 1.1.2","nogg":">= 0.0.2"},"devDependencies":{"jade":"0.13.0","eco":"1.1.0-rc-1","ejs":"0.4.3","haml":"0.4.2","coffeekup":"0.3.0"},"keywords":["template","view","coffeescript","coffeekup"],"main":"./lib/coffeemugg","engines":{"node":">= 0.4.7"},"contributors":[{"name":"Maurice Machado","email":"maurice@bitbending.com"}],"_npmUser":{"name":"jaekwon","email":"jkwon.work@gmail.com"},"_id":"coffeemugg@0.0.2","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"9977fe97466c424462746f5536a4fe40ce2f0252","tarball":"https://registry.npmjs.org/coffeemugg/-/coffeemugg-0.0.2.tgz","integrity":"sha512-BLwGUR4hpKFBRk89VohBtSdtkiF6WeNo9T0pIH/93a8Np88FXGKb4R3jYP16pSQ4Lo5LJDLbQCDNikJiDW3TtQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8rq7zo67BVbTOIcXU2hmeu0zEuPZ7uPJmWMQaGGLhSgIhAK41Kv3weGbOZ1n4jBfT4FxrJmpt+rUC+8rITs02878Q"}]},"maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}],"directories":{}},"0.0.3":{"name":"coffeemugg","description":"HTML templating with CoffeeScript.","version":"0.0.3","author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"},"dependencies":{"coffee-script":">= 1.1.2","nogg":">= 0.0.2"},"devDependencies":{"jade":"0.13.0","eco":"1.1.0-rc-1","ejs":"0.4.3","haml":"0.4.2","coffeekup":"0.3.0"},"keywords":["template","view","coffeescript","coffeekup"],"main":"./lib/coffeemugg","engines":{"node":">= 0.4.7"},"contributors":[{"name":"Maurice Machado","email":"maurice@bitbending.com"}],"_npmUser":{"name":"jaekwon","email":"jkwon.work@gmail.com"},"_id":"coffeemugg@0.0.3","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"d271a3568381897a1acdf0a1a596bb9e69357f1d","tarball":"https://registry.npmjs.org/coffeemugg/-/coffeemugg-0.0.3.tgz","integrity":"sha512-x0/LuuTsV8Y/Kgr7T94zSxMM0c9+50baJ3kLJteoySxIxV+CuLCzXTDEtqu72jt2NPpGkIhBerkbE/FPK3HBvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHll4IBGhfD2tqcZT39PdfbXcytXCjM3P8R3wvElg0gNAiEAw3TBswpa/TDVDFohCtDQ5EWhkN6ny2MXDEO5eNWvehU="}]},"maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}],"directories":{}},"0.0.4":{"name":"coffeemugg","description":"HTML templating with CoffeeScript.","version":"0.0.4","author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"},"dependencies":{"coffee-script":">= 1.1.2","nogg":">= 0.0.2"},"devDependencies":{"jade":"0.13.0","eco":"1.1.0-rc-1","ejs":"0.4.3","haml":"0.4.2","coffeekup":"0.3.0"},"keywords":["template","view","coffeescript","coffeekup"],"main":"./lib/coffeemugg","engines":{"node":">= 0.4.7"},"contributors":[{"name":"Maurice Machado","email":"maurice@bitbending.com"}],"readme":"CoffeeMugg\n==========\n\nCoffeeMugg is a templating engine for [node.js](http://nodejs.org) and browsers that lets you to write your HTML templates in 100% pure [CoffeeScript](http://coffeescript.org).\n\nCoffeeMugg is a branch of [CoffeeKup](https://github.com/mauricemach/coffeekup). The main difference is that instead of local tag functions, tag functions are bound to `this`.\n\n## Why CoffeeMugg?\n\n * No magic compilation step: the template code runs as you would expect.\n * Local variables obey original Javascript/Coffeescript rules.\n * If you want to create a template dynamically using function closures, you can!\n * This makes it easier to create libraries of view-helper routines, in the manner of RoR ActionView.\n\n## Sample\n\nBasic example:\n```coffeescript\ncoffeemugg.render ->\n  @div ->\n    @p \"I am a paragraph\"\n```\n\nWith subroutines:\n```coffeescript\nsubroutines = {\n  myroutine: ->\n    @p 'blah blah'\n}\n\ntemplate = ->\n  @div ->\n    @myroutine()\n\ncoffeemugg.render template, {context: subroutines}\n```\n\nWith arguments:\n```coffeescript\ntemplate = (div_id, contents) ->\n  @div id:div_id, ->\n    for content in contents\n      @div content\n\ncoffeemugg.render template, <OPTIONS>, \"FRUITS\", [\"Apple\", \"Banana\", \"Raisin\"]\n```\n\n## Installation\n\n    npm install coffeemugg\n    \n## Cli\n\nCreate static html files in CoffeeMugg syntax. It's adapted from coffeecup.\n```\ncoffeemugg -h\n\nUsage:\n  coffeemugg [options] path/to/template.coffee\n\n  -w, --watch        watch templates for changes, and recompile\n  -o, --output       set the directory for compiled html\n  -p, --print        print the compiled html to stdout, don't write file\n  -f, --format       apply line breaks and indentation to html output\n  -v, --version      display coffeemugg version\n  -h, --help         display this help message\n```\n\n## More\n\nPlease take a look at the excellent [CoffeeScript](http://coffeescript.org) documentation for more information.\n\n## Special thanks\n\n  - [Jeremy Ashkenas](https://github.com/jashkenas), for the amazing CoffeeScript language.\n  - [Maurice Machado](https://github.com/mauricemach), for CoffeeKup. Hope you're OK with this.\n  - [W. Mertens](https://github.com/wmertens), for the latest contributions.\n","_id":"coffeemugg@0.0.4","dist":{"shasum":"ace29f9d87d151cb6524451356d454734b1b7858","tarball":"https://registry.npmjs.org/coffeemugg/-/coffeemugg-0.0.4.tgz","integrity":"sha512-ZL8qzz6MRjsAchICrXaIGePyaciNQxfhqlL9Tnh3Buyq9EbKYJ9idV00wnSJlcP059gmEnXAtm0VcsrE+7KKNg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2PbgaaLK37h52W2OIu07GpgpQoor//nzDqDoj6EIDUAiB6DIn2NVg0r1jxRkQwhE1Ui4wJGNozDIhKFnRYn40tBw=="}]},"maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}],"directories":{}},"0.0.5":{"name":"coffeemugg","description":"HTML templating with CoffeeScript.","version":"0.0.5","author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"},"dependencies":{"coffee-script":">= 1.1.2"},"devDependencies":{"jade":"0.13.0","eco":"1.1.0-rc-1","ejs":"0.4.3","haml":"0.4.2","coffeekup":"0.3.0"},"keywords":["template","view","coffeescript","coffeekup"],"main":"./lib/coffeemugg","engines":{"node":">= 0.4.7"},"contributors":[{"name":"Maurice Machado","email":"maurice@bitbending.com"}],"readme":"CoffeeMugg\n==========\n\nCoffeeMugg is a templating engine for [node.js](http://nodejs.org) and browsers that lets you to write your HTML templates in 100% pure [CoffeeScript](http://coffeescript.org).\n\nCoffeeMugg is a branch of [CoffeeKup](https://github.com/mauricemach/coffeekup). The main difference is that instead of local tag functions, tag functions are bound to `this`.\n\n## Why CoffeeMugg?\n\n * No magic compilation step: the template code runs as you would expect.\n * Local variables obey original Javascript/Coffeescript rules.\n * If you want to create a template dynamically using function closures, you can!\n * This makes it easier to create libraries of view-helper routines, in the manner of RoR ActionView.\n\n## Sample\n\nBasic example:\n```coffeescript\ncoffeemugg.render ->\n  @div ->\n    @p \"I am a paragraph\"\n```\n\nWith subroutines:\n```coffeescript\nsubroutines = {\n  myroutine: ->\n    @p 'blah blah'\n}\n\ntemplate = ->\n  @div ->\n    @myroutine()\n\ncoffeemugg.render template, {context: subroutines}\n```\n\nWith arguments:\n```coffeescript\ntemplate = (div_id, contents) ->\n  @div id:div_id, ->\n    for content in contents\n      @div content\n\ncoffeemugg.render template, <OPTIONS>, \"FRUITS\", [\"Apple\", \"Banana\", \"Raisin\"]\n```\n\n## Installation\n\n    npm install coffeemugg\n    \n## Cli\n\nCreate static html files in CoffeeMugg syntax. It's adapted from coffeecup.\n```\ncoffeemugg -h\n\nUsage:\n  coffeemugg [options] path/to/template.coffee\n\n  -w, --watch        watch templates for changes, and recompile\n  -o, --output       set the directory for compiled html\n  -p, --print        print the compiled html to stdout, don't write file\n  -f, --format       apply line breaks and indentation to html output\n  -v, --version      display coffeemugg version\n  -h, --help         display this help message\n```\n\n## More\n\nPlease take a look at the excellent [CoffeeScript](http://coffeescript.org) documentation for more information.\n\n## Special thanks\n\n  - [Jeremy Ashkenas](https://github.com/jashkenas), for the amazing CoffeeScript language.\n  - [Maurice Machado](https://github.com/mauricemach), for CoffeeKup. Hope you're OK with this.\n  - [W. Mertens](https://github.com/wmertens), for the latest contributions.\n","_id":"coffeemugg@0.0.5","dist":{"shasum":"4cd78a947107687e896ac5b83103bbddc30acae7","tarball":"https://registry.npmjs.org/coffeemugg/-/coffeemugg-0.0.5.tgz","integrity":"sha512-a2sNOxwokVUIttd1+68P14FZXu3UA6w0q74q7VXGioIEUgxcq2d51xgVVoYsD8w6xWHHPeN6n7cMNP1lBagArw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGQQ3y9QTMwy5gbDuzmeXDIJK6IpNTqQsB7GSBh91Eq8AiBippWUjJwHJJjcOKpHJZ9fpD5CwQweCZts9Vko45TIKQ=="}]},"maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}],"directories":{}},"0.0.6":{"name":"coffeemugg","description":"HTML templating with CoffeeScript.","version":"0.0.6","author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"},"dependencies":{"coffee-script":">= 1.1.2"},"devDependencies":{"jade":"0.13.0","eco":"1.1.0-rc-1","ejs":"0.4.3","haml":"0.4.2","coffeekup":"0.3.0"},"keywords":["template","view","coffeescript","coffeekup"],"main":"./lib/coffeemugg","engines":{"node":">= 0.4.7"},"contributors":[{"name":"Maurice Machado","email":"maurice@bitbending.com"},{"name":"W. Mertens","email":"https://github.com/wmertens"}],"readme":"CoffeeMugg\n==========\n\nCoffeeMugg is a templating engine for [node.js](http://nodejs.org) and browsers that lets you to write your HTML templates in 100% pure [CoffeeScript](http://coffeescript.org).\n\nCoffeeMugg is a branch of [CoffeeKup](https://github.com/mauricemach/coffeekup). The main difference is that instead of local tag functions, tag functions are bound to `this`.\n\n## Why CoffeeMugg?\n\n * No magic compilation step: the template code runs as you would expect.\n * Local variables obey original Javascript/Coffeescript rules.\n * If you want to create a template dynamically using function closures, you can!\n * This makes it easier to create libraries of view-helper routines, in the manner of RoR ActionView.\n\n## Sample\n\nBasic example:\n```coffeescript\ncoffeemugg.render ->\n  @div ->\n    @p \"I am a paragraph\"\n```\n\nWith subroutines:\n```coffeescript\nsubroutines = {\n  myroutine: ->\n    @p 'blah blah'\n}\n\ntemplate = ->\n  @div ->\n    @myroutine()\n\ncoffeemugg.render template, {context: subroutines}\n```\n\nWith arguments:\n```coffeescript\ntemplate = (div_id, contents) ->\n  @div id:div_id, ->\n    for content in contents\n      @div content\n\ncoffeemugg.render template, <OPTIONS>, \"FRUITS\", [\"Apple\", \"Banana\", \"Raisin\"]\n```\n\n## Installation\n\n    npm install coffeemugg\n    \n## Cli\n\nCreate static html files in CoffeeMugg syntax. It's adapted from coffeecup.\n```\ncoffeemugg -h\n\nUsage:\n  coffeemugg [options] path/to/template.coffee\n\n  -w, --watch        watch templates for changes, and recompile\n  -o, --output       set the directory for compiled html\n  -p, --print        print the compiled html to stdout, don't write file\n  -f, --format       apply line breaks and indentation to html output\n  -v, --version      display coffeemugg version\n  -h, --help         display this help message\n```\n\n## More\n\nPlease take a look at the excellent [CoffeeScript](http://coffeescript.org) documentation for more information.\n\n## Special thanks\n\n  - [Jeremy Ashkenas](https://github.com/jashkenas), for the amazing CoffeeScript language.\n  - [Maurice Machado](https://github.com/mauricemach), for CoffeeKup. Hope you're OK with this.\n  - [W. Mertens](https://github.com/wmertens), for the latest contributions.\n","readmeFilename":"README.md","_id":"coffeemugg@0.0.6","dist":{"shasum":"6fe18223b47f61a6a9a22511a47d0e838ae802c5","tarball":"https://registry.npmjs.org/coffeemugg/-/coffeemugg-0.0.6.tgz","integrity":"sha512-t4Bxxhgb1QFio4OXWZ+/DGuAGepoPUm/+2ytLTNkO0s7uZ0YGBELVEt35l+AZ97J/wiRWNX3MfcBQAcFN6WDrQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEjnMWeL1L1ObsdU52LIsuucLWPmp/+GoIfPedDhq3egIgfTajjtxhYFlF3GQnQu09sVgqosr4t/pukEyIClHjCWw="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"jaekwon","email":"jkwon.work@gmail.com"},"maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}],"directories":{}},"0.0.7":{"name":"coffeemugg","description":"HTML templating with CoffeeScript.","version":"0.0.7","author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"},"dependencies":{"coffee-script":">= 1.1.2"},"devDependencies":{"jade":"0.13.0","eco":"1.1.0-rc-1","ejs":"0.4.3","haml":"0.4.2","coffeekup":"0.3.0"},"keywords":["template","view","coffeescript","coffeekup"],"main":"./lib/coffeemugg","engines":{"node":">= 0.4.7"},"contributors":[{"name":"Maurice Machado","email":"maurice@bitbending.com"},{"name":"W. Mertens","email":"https://github.com/wmertens"}],"readme":"CoffeeMugg\n==========\n\nCoffeeMugg is a templating engine for [node.js](http://nodejs.org) and browsers that lets you to write your HTML templates in 100% pure [CoffeeScript](http://coffeescript.org).\n\nCoffeeMugg is a branch of [CoffeeKup](https://github.com/mauricemach/coffeekup). The main difference is that instead of local tag functions, tag functions are bound to `this`.\n\n## Why CoffeeMugg?\n\n * No magic compilation step: the template code runs as you would expect.\n * Local variables obey original Javascript/Coffeescript rules.\n * If you want to create a template dynamically using function closures, you can!\n * This makes it easier to create libraries of view-helper routines, in the manner of RoR ActionView.\n\n## Sample\n\nBasic example:\n```coffeescript\ncm = require 'coffeemugg'\n\ncm.render ->\n  @div ->\n    @p \"I am a paragraph\"\n    @raw \"<p> This is unescaped, raw HTML </p>\"\n    @text \"<< This will be escaped ! >>\"\n```\n\n## Custom TAG functions (subroutines)\n\nYou can add custom @TAG functions to CoffeeMugg with 'plugins'.\n\n```coffeescript\n# Install custom tags! In this case, just the tag '@showFruits'\ncm.install_plugin ->\n\n  # The tag 'showFruits' will become available everywhere.\n  # It is a regular function, so it can take arguments too, like 'fruits'\n  @showFruits = (fruits) ->\n    @ul ->\n      for fruit in fruits\n        @li fruit\n\n# Here is the main template function.\n# Notice that the main template function can also take javascript arguments.\ntemplate = (fruits) ->\n  @div ->\n    # Pass in 'fruits' to our custom '@showFruits' tag\n    @showFruits fruits\n\n# Options to CoffeeMugg\n#   autoescape: The \"text\" values are automatically HTML escaped.\n#               You can still use the '@raw' tag for unescaped text.\n#               Default: yes\n#   format:     The output HTML will be formatted all pretty.\n#               Default: yes\noptions = {\n  autoescape: yes\n  format:     yes\n}\nfruits  = ['Apple', 'Banana', 'Raisin', 'Rice Crispies', 'Mickey Mouse']\ncm.render template, options, fruits\n```\n\n## Sample plugins\n\nSample plugins are in the 'plugins' directory. The best way to use them is to copy them\ninto your project (which manages your dependencies), and install them via 'install_plugin':\n``` coffeescript\ncm = require 'coffeemugg'\n# Use the 'marked' markdown language.\n# Your project needs to have 'marked' as a dependency.\n# Note, './plugins' is a folder in _your_ project.\ncm.install_plugin require('./plugins/marked')\n# Use the 'partials' system for templating ease.\n# Note, './templates' is a folder in your project.\ncm.install_plugin require('./plugins/partials')(require, './templates')\n\ntemplate = ->\n  @p ->\n    @marked \"This is using __markdown__\"\n    @partial '_mypartial', 'myarg'\n```\n\n## Installation\n\n    npm install coffeemugg\n    \n## Cli\n\nCreate static html files in CoffeeMugg syntax. It's adapted from coffeecup.\n```\ncoffeemugg -h\n\nUsage:\n  coffeemugg [options] path/to/template.coffee\n\n  -w, --watch        watch templates for changes, and recompile\n  -o, --output       set the directory for compiled html\n  -p, --print        print the compiled html to stdout, don't write file\n  -f, --format       apply line breaks and indentation to html output\n  -v, --version      display coffeemugg version\n  -h, --help         display this help message\n```\n\n## More\n\nPlease take a look at the excellent [CoffeeScript](http://coffeescript.org) documentation for more information.\n\n## Special thanks\n\n  - [Jeremy Ashkenas](https://github.com/jashkenas), for the amazing CoffeeScript language.\n  - [Maurice Machado](https://github.com/mauricemach), for CoffeeKup. Hope you're OK with this.\n  - [W. Mertens](https://github.com/wmertens), for the latest contributions.\n","readmeFilename":"README.md","_id":"coffeemugg@0.0.7","dist":{"shasum":"c98341f51fabacf423b0ae493b2cb2a9efb826b8","tarball":"https://registry.npmjs.org/coffeemugg/-/coffeemugg-0.0.7.tgz","integrity":"sha512-FGwrsm7BVlEmCH+Io90xq0LOGPEWlk8ANITN3NCwW6JQKCcgpzGK/WSwdBWZzjqV9lwGPITwH1b4R7w1PtMQTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHijsLAr2aErhKkO3PdmsPNGz+tk1vspqTk0PiaT8+PgAiEAzJSgkof4Y1CI43smJjKL/XQRZP8KsY+hvLfiiXtBXTw="}]},"_npmVersion":"1.2.0","_npmUser":{"name":"jaekwon","email":"jkwon.work@gmail.com"},"maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}]},"0.0.8":{"name":"coffeemugg","description":"HTML templating with CoffeeScript.","version":"0.0.8","author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"},"dependencies":{"coffee-script":">= 1.1.2"},"devDependencies":{"jade":"0.13.0","eco":"1.1.0-rc-1","ejs":"0.4.3","haml":"0.4.2","coffeekup":"0.3.0"},"keywords":["template","view","coffeescript","coffeekup"],"main":"./lib/coffeemugg","engines":{"node":">= 0.4.7"},"contributors":[{"name":"Maurice Machado","email":"maurice@bitbending.com"},{"name":"W. Mertens","email":"https://github.com/wmertens"}],"readme":"CoffeeMugg\n==========\n\nCoffeeMugg is a templating engine for [node.js](http://nodejs.org) and browsers that lets you to write your HTML templates in 100% pure [CoffeeScript](http://coffeescript.org).\n\nCoffeeMugg is a branch of [CoffeeKup](https://github.com/mauricemach/coffeekup). The main difference is that instead of local tag functions, tag functions are bound to `this`.\n\n## Why CoffeeMugg?\n\n * No magic compilation step: the template code runs as you would expect.\n * Local variables obey original Javascript/Coffeescript rules.\n * If you want to create a template dynamically using function closures, you can!\n * This makes it easier to create libraries of view-helper routines, in the manner of RoR ActionView.\n\n## Sample\n\nBasic example:\n```coffeescript\ncm = require 'coffeemugg'\n\ncm.render ->\n  @div ->\n    @p \"I am a paragraph\"\n    @raw \"<p> This is unescaped, raw HTML </p>\"\n    @text \"<< This will be escaped ! >>\"\n```\n\n## Custom TAG functions (subroutines)\n\nYou can add custom @TAG functions to CoffeeMugg with 'plugins'.\n\n```coffeescript\n# Install custom tags! In this case, just the tag '@showFruits'\ncm.install_plugin ->\n\n  # The tag 'showFruits' will become available everywhere.\n  # It is a regular function, so it can take arguments too, like 'fruits'\n  @showFruits = (fruits) ->\n    @ul ->\n      for fruit in fruits\n        @li fruit\n\n# Here is the main template function.\n# Notice that the main template function can also take javascript arguments.\ntemplate = (fruits) ->\n  @div ->\n    # Pass in 'fruits' to our custom '@showFruits' tag\n    @showFruits fruits\n\n# Options to CoffeeMugg\n#   autoescape: The \"text\" values are automatically HTML escaped.\n#               You can still use the '@raw' tag for unescaped text.\n#               Default: yes\n#   format:     The output HTML will be formatted all pretty.\n#               Default: yes\noptions = {\n  autoescape: yes\n  format:     yes\n}\nfruits  = ['Apple', 'Banana', 'Raisin', 'Rice Crispies', 'Mickey Mouse']\ncm.render template, options, fruits\n```\n\n## Sample plugins\n\nSample plugins are in the 'plugins' directory. The best way to use them is to copy them\ninto your project (which manages your dependencies), and install them via 'install_plugin':\n``` coffeescript\ncm = require 'coffeemugg'\n# Use the 'marked' markdown language.\n# Your project needs to have 'marked' as a dependency.\n# Note, './plugins' is a folder in _your_ project.\ncm.install_plugin require('./plugins/marked')\n# Use the 'partials' system for templating ease.\n# Note, './templates' is a folder in your project.\ncm.install_plugin require('./plugins/partials')(require, './templates')\n\ntemplate = ->\n  @p ->\n    @marked \"This is using __markdown__\"\n    @partial '_mypartial', 'myarg'\n```\n\n## Installation\n\n    npm install coffeemugg\n    \n## Cli\n\nCreate static html files in CoffeeMugg syntax. It's adapted from coffeecup.\n```\ncoffeemugg -h\n\nUsage:\n  coffeemugg [options] path/to/template.coffee\n\n  -w, --watch        watch templates for changes, and recompile\n  -o, --output       set the directory for compiled html\n  -p, --print        print the compiled html to stdout, don't write file\n  -f, --format       apply line breaks and indentation to html output\n  -v, --version      display coffeemugg version\n  -h, --help         display this help message\n```\n\n## More\n\nPlease take a look at the excellent [CoffeeScript](http://coffeescript.org) documentation for more information.\n\n## Special thanks\n\n  - [Jeremy Ashkenas](https://github.com/jashkenas), for the amazing CoffeeScript language.\n  - [Maurice Machado](https://github.com/mauricemach), for CoffeeKup. Hope you're OK with this.\n  - [W. Mertens](https://github.com/wmertens), for the latest contributions.\n","_id":"coffeemugg@0.0.8","dist":{"shasum":"2d1ab2e7b09b59e3459b3f018747be6f18bcca74","tarball":"https://registry.npmjs.org/coffeemugg/-/coffeemugg-0.0.8.tgz","integrity":"sha512-ESQ9FChL6QrO9zwzJE2+WhfM36V46jBFnCqSHNlN35WYREvm/Z88aJw/wJsg1I7JLwuvviurjHSMzN18rivF+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlD6+hKjucH/vfMX4+LAN3ifGSx1BxwVn93690UdTdfgIhAPBOPokM0YVUCN6zSrCbNrQOkSEHJVXXN+houHRWXCf6"}]},"maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}]}},"readme":"CoffeeMugg\n==========\n\nCoffeeMugg is a templating engine for [node.js](http://nodejs.org) and browsers that lets you to write your HTML templates in 100% pure [CoffeeScript](http://coffeescript.org).\n\nCoffeeMugg is a branch of [CoffeeKup](https://github.com/mauricemach/coffeekup). The main difference is that instead of local tag functions, tag functions are bound to `this`.\n\nWhy CoffeeMugg?\n===============\n\n * First, a disclaimer: I can't vouch for the usefulness of this branch just yet.\n * I believe this makes it easier to create libraries of view-helper routines, in the manner of RoR ActionView.\n * CoffeeMugg is easier to grok than CoffeeKup, since it's straight up Javascript/Coffeescript without an intermediate compilation step, and local variables obey original Javascript/Coffeescript rules. If you want to create a template dynamically using function closures, why go ahead.\n * There is no compilation step, so rendering on the client may be faster.\n\nSample\n======\n\n    coffeemugg.render ->\n      @div ->\n        @p \"I am a paragraph\"\n\nwith subroutines:\n\n    # Create a new class with all the subroutines\n    MyContext = CMContext.extend({\n      myroutine: ->\n        @p 'blah blah'\n    })\n    \n    # Create a rendering instance\n    context = new MyContext()\n    context.render ->\n      @div ->\n        @myroutine()\n\nwith arguments:\n\n    template = (div_id, contents) ->\n      @div id: #div_id, ->\n        for content in contents\n          @div content\n\n    coffeemugg.render template, <OPTIONS>, \"FRUITS\", [\"Apple\", \"Banana\", \"Raisin\"]\n\nInstallation\n============\n\n    npm install coffeemugg\n\nMore\n====\n\nPlease take a look at the excellent [CoffeeScript](http://coffeescript.org) documentation for more information.\n\nSpecial thanks\n==============\n\n  - [Jeremy Ashkenas](https://github.com/jashkenas), for the amazing CoffeeScript language.\n  - [Maurice Machado](https://github.com/mauricemach), for CoffeeKup. Hope you're OK with this.\n","maintainers":[{"name":"jaekwon","email":"jkwon.work@gmail.com"}],"time":{"modified":"2022-06-13T06:28:30.860Z","created":"2011-12-07T23:14:08.278Z","0.0.1":"2011-12-07T23:14:09.770Z","0.0.2":"2011-12-11T21:36:50.334Z","0.0.3":"2011-12-13T02:19:59.871Z","0.0.4":"2012-08-21T04:06:09.049Z","0.0.5":"2012-11-05T06:46:11.378Z","0.0.6":"2013-01-20T00:01:21.328Z","0.0.7":"2013-01-27T03:57:25.950Z","0.0.8":"2013-04-16T21:34:43.663Z"},"author":{"name":"Jae Kwon","email":"jkwon.work@gmail.com"},"repository":{"type":"git","url":"git://github.com/jaekwon/coffeemugg.git"}}