{"_id":"coffeete","_rev":"35-680a5bdcef11c1fd6637a7b12a3b8929","name":"coffeete","description":"Simple templating with coffee-script string interpolation.","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"coffeete","description":"Simple templating with coffee-script string interpolation.","version":"0.0.1","homepage":"https://github.com/icetan/coffeete","author":{"name":"Christopher Fredén","email":"c.freden@gmail.com"},"keywords":["coffee-script","template"],"repository":{"type":"git","url":"git://github.com/icetan/coffeete.git"},"main":"./src/coffeete.js","ender":"./src/ender.js","_npmUser":{"name":"icetan","email":"c.freden@gmail.com"},"_id":"coffeete@0.0.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.5","_defaultsLoaded":true,"dist":{"shasum":"163d7ba99aeb7d65e6c4e4b48a0c7920c58d8483","tarball":"https://registry.npmjs.org/coffeete/-/coffeete-0.0.1.tgz","integrity":"sha512-r/EMygF9+3AXVmgZOWx6duqa05HWkXhhHLfds93tqOdGZe9bl0F0Q+fcCG8lfbHlBm1q4s13hs/QVAA8lFB9mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICai1PNxbNTsoivABH6aQNet9VljmNT0KQgLE43jE3E9AiEAxwHtaOkJ3SndScvjje2l1JW1TX3oayGSVwHT13NL0Jo="}]},"maintainers":[{"name":"icetan","email":"c.freden@gmail.com"}],"directories":{}},"0.0.2":{"name":"coffeete","description":"Simple templating with coffee-script string interpolation.","version":"0.0.2","homepage":"https://github.com/icetan/coffeete","author":{"name":"Christopher Fredén","email":"c.freden@gmail.com"},"keywords":["coffee-script","template"],"repository":{"type":"git","url":"https://github.com/icetan/coffeete.git"},"main":"./src/coffeete.js","ender":"./src/ender.js","readme":"# CoffeeTe\n\n_Templating with CoffeeScript_\n\n## Installation\n\n### With NPM for Node.js\n\n_Note: Because of incompatibility with Ender.js the dependence on CoffeeScript will not be installed automatically._\n\n    npm install coffee-script coffeete\n\n### Or with Ender.js for the browser\n\n    ender build coffeete\n\n## How\n\nIt is very simple and very little code. It uses the CoffeeScript compiler for\nstring interpolation. The tool chain: CoffeeTe -> CoffeeScript\n-> JavaScript.\n\n## Examples\n\n### Our template\n\n```\n<script id=\"about-me\" type=\"text/x-coffeete\">\n  <h1>#{cap name}</h1>\n  <p>\n    #{about}\n  </p>\n  <ul>\n    !{for hobby in hobbies\n      <li class=\"#{if _i%2 then 'even' else 'odd'}\">\n        #{hobby}\n      </li>\n    }!\n  </ul>\n</script>\n```\n\n### The view data\n\n```javascript\nvar view = {\n      name: \"christopher\"\n    , about: \"I like grapefriut.\"\n    , hobbies: [\"Computers\", \"Martial Arts\", \"Coffee\"]\n    , cap: function (str) {\n      return str.slice(0,1).toUpperCase()+str.slice(1);\n    }\n  };\n```\n\n### In the browser\n\n```javascript\nvar str = document.getElementById('about-me').text\n  // Compile a CoffeeTe string to a template function ready to recieve data.\n  , template = coffeete(str)\n  // Run our compiled template with the view data to get a ready HTML string.\n  , html = template(view);\n\n// Fill the page with our newly rendered HTML.\ndocument.getElementsByTagName('body')[0].innerHTML += html;\n```\n\n### With Node.js\n\n```javascript\nvar str = fs.readFileSync('about-me.chtml').toString()\n  , template = coffeete(str)\n  , html = template(view);\n\n// Write to a static HTML file or serve directly over HTTP.\nfs.writeFile('about-me.html', html);\n```\n\n### The result\n\n```html\n<h1>Christopher</h1>\n<p>\n  I like grapefriut.\n</p>\n<ul>\n  \n    <li class=\"odd\">\n      Computers\n    </li>\n  \n    <li class=\"even\">\n      Martial Arts\n    </li>\n  \n    <li class=\"odd\">\n      Coffee\n    </li>\n  \n</ul>\n```","_id":"coffeete@0.0.2","dist":{"shasum":"eea313a715072e99c2e54273c3535960da0b44f1","tarball":"https://registry.npmjs.org/coffeete/-/coffeete-0.0.2.tgz","integrity":"sha512-1bevD0/4nE3KKud5UVAJ2+EHPEocXPY9ryhn2nsq5UuVefeHIg9Ne+MZ5QMznppHV43z0gXvnB0da4iW9mzY/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFVDE3VtX7C37HtdEeTPQ/kSQ5nyj4jrkK1vuDH7aIGqAiEAy07LCkdW5r6hlo8Te6Me/dgzd/rnvUxgz9kEJtvN/UU="}]},"maintainers":[{"name":"icetan","email":"c.freden@gmail.com"}],"directories":{}},"0.0.3":{"name":"coffeete","description":"Simple templating with coffee-script string interpolation.","version":"0.0.3","homepage":"https://github.com/icetan/coffeete","author":{"name":"Christopher Fredén","email":"c.freden@gmail.com"},"keywords":["coffee-script","template"],"repository":{"type":"git","url":"https://github.com/icetan/coffeete.git"},"dependencies":{"coffee-script-browser":"~1.3"},"main":"./src/coffeete.js","ender":"noop","readme":"# CoffeeTe\n\n_Templating with CoffeeScript_\n\n## Installation\n\n### With NPM for Node.js\n\n    npm install coffeete\n\n### Or with Ender.js for the browser\n\n    ender build coffeete\n\n## How\n\nIt is very simple and very little code. It uses the CoffeeScript compiler for\nstring interpolation. The tool chain: CoffeeTe → CoffeeScript\n→ JavaScript.\n\n## Examples\n\n### Our template\n\n```\n<script id=\"about-me\" type=\"text/x-coffeete\">\n  <h1>#{cap name}</h1>\n  <p>\n    #{about}\n  </p>\n  <ul>\n    !{for hobby, i in hobbies\n      <li class=\"#{if i % 2 then 'even' else 'odd'}\">\n        #{hobby}\n      </li>\n    }!\n  </ul>\n</script>\n```\n\n### The view data\n\n```javascript\nvar view = {\n      name: \"christopher\"\n    , about: \"I like grapefriut.\"\n    , hobbies: [\"Computers\", \"Martial Arts\", \"Coffee\"]\n    , cap: function (str) {\n      return str.slice(0,1).toUpperCase()+str.slice(1);\n    }\n  };\n```\n\n### In the browser\n\n```javascript\nvar str = document.getElementById('about-me').text\n  // Compile a CoffeeTe string to a template function ready to recieve data.\n  , template = coffeete(str)\n  // Run our compiled template with the view data to get a ready HTML string.\n  , html = template(view);\n\n// Fill the page with our newly rendered HTML.\ndocument.getElementsByTagName('body')[0].innerHTML += html;\n```\n\n### With Node.js\n\n```javascript\nvar str = fs.readFileSync('about-me.chtml').toString()\n  , template = coffeete(str)\n  , html = template(view);\n\n// Write to a static HTML file or serve directly over HTTP.\nfs.writeFile('about-me.html', html);\n```\n\n### The result\n\n```html\n<h1>Christopher</h1>\n<p>\n  I like grapefriut.\n</p>\n<ul>\n  \n    <li class=\"odd\">\n      Computers\n    </li>\n  \n    <li class=\"even\">\n      Martial Arts\n    </li>\n  \n    <li class=\"odd\">\n      Coffee\n    </li>\n  \n</ul>\n```\n","_id":"coffeete@0.0.3","dist":{"shasum":"64f68a824fa426a8ee8ca626b654b6c894dd136d","tarball":"https://registry.npmjs.org/coffeete/-/coffeete-0.0.3.tgz","integrity":"sha512-OVjTL5nr8/AHfwBEAhAafPufdaXhSTGfzcdJrLykzR4idCs5xBKi9dEimIQs22glEwJrku6Q/ESNjm7CXRMb+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/9L2j3NaRO/Hmee087rbj+ulNBeRu44AiWK0caZg3UgIgOzJrvXk155S1qKbR/0ZP/guNtGdok2VXrARfMzfSq58="}]},"maintainers":[{"name":"icetan","email":"c.freden@gmail.com"}]},"0.0.4":{"name":"coffeete","description":"Simple templating with coffee-script string interpolation.","version":"0.0.4","homepage":"https://github.com/icetan/coffeete","author":{"name":"Christopher Fredén","email":"c.freden@gmail.com"},"keywords":["coffee-script","template"],"repository":{"type":"git","url":"https://github.com/icetan/coffeete.git"},"dependencies":{"coffee-script-browser":"~1.3"},"main":"./src/coffeete.js","ender":"noop","bin":{"coffeete":"./bin/coffeete.js"},"readme":"# CoffeeTe\n\n_Templating with CoffeeScript_\n\n## Installation\n\n### With NPM for Node.js\n\n_Note: Because of incompatibility with Ender.js the dependence on CoffeeScript will not be installed automatically._\n\n    # npm install coffeete coffee-script\n\n### Or with Ender.js for the browser\n\n    # ender build coffeete\n\n## How\n\nIt is very simple and very lightweight. It uses the CoffeeScript compiler for\nstring interpolation. The tool chain: CoffeeTe → CoffeeScript\n→ JavaScript.\n\n## Examples\n\n### Our template\n\n```\n<script id=\"about-me\" type=\"text/x-coffeete\">\n  <h1>#{cap name}</h1>\n  <p>\n    #{about}\n  </p>\n  <ul>\n    !{for hobby, i in hobbies\n      <li class=\"#{if i % 2 then 'even' else 'odd'}\">\n        #{hobby}\n      </li>\n    }!\n  </ul>\n</script>\n```\n\n### The view data\n\n```javascript\nvar view = {\n      name: \"christopher\"\n    , about: \"I like grapefriut.\"\n    , hobbies: [\"Computers\", \"Martial Arts\", \"Coffee\"]\n    , cap: function (str) {\n      return str.slice(0,1).toUpperCase()+str.slice(1);\n    }\n  };\n```\n\n### In the browser\n\n```javascript\nvar str = document.getElementById('about-me').text\n  // Compile a CoffeeTe string to a template function ready to recieve data.\n  , template = coffeete(str)\n  // Run our compiled template with the view data to get a ready HTML string.\n  , html = template(view);\n\n// Fill the page with our newly rendered HTML.\ndocument.getElementsByTagName('body')[0].innerHTML += html;\n```\n\n### With Node.js\n\n```javascript\nvar str = fs.readFileSync('about-me.chtml').toString()\n  , template = coffeete(str)\n  , html = template(view);\n\n// Write to a static HTML file or serve directly over HTTP.\nfs.writeFile('about-me.html', html);\n```\n\nOr use the ```.coffeete``` file extension to automatically compile your template.\nNow importing your ```about-me.coffeete``` can be done with ```require```.\n\n```javascript\nvar template = require('./about-me')\n  , html = template(view);\n\nfs.writeFile('about-me.html', html);\n```\n\n### The result\n\n```html\n<h1>Christopher</h1>\n<p>\n  I like grapefriut.\n</p>\n<ul>\n  \n    <li class=\"odd\">\n      Computers\n    </li>\n  \n    <li class=\"even\">\n      Martial Arts\n    </li>\n  \n    <li class=\"odd\">\n      Coffee\n    </li>\n  \n</ul>\n```\n\n## Pre-compiling\n\nThe downside, specialy when running in the browser, is the dependency on\nCoffeeScript at runtime and the need to compile your CoffeeTe templates\nruntime. Therfore you can pre compile your templates into pure JavaScript and\nsave them as CommonJS compliant modules.\n\n    # npm install -g coffeete coffee-script\n\nNow we have installed the CoffeeTe CLI globaly.\n\n    # coffeete about-me.chtml > about-me.js\n\nOr, if you prefere.\n\n    # cat about-me.chtml | coffeete > about-me.js\n","_id":"coffeete@0.0.4","dist":{"shasum":"669ca8933f0b238c39fcc3a50f82a9718cb29221","tarball":"https://registry.npmjs.org/coffeete/-/coffeete-0.0.4.tgz","integrity":"sha512-0GdaOgmtDWmXs5hPGC7nFTAcUUaXRRj4fB1eFfDkR/JeSPILJD5Pxw77/qXPTzV+/+mDmaNOU8spQrGRIKehQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlwG2ZQKQbLu+Fi7x+MRCz7JIMH6FKiRkjQYxM/7ibNgIga/BOlkdMi//MLtH7wFb5SkAiOq0VWeac7l8a8PXPTAw="}]},"maintainers":[{"name":"icetan","email":"c.freden@gmail.com"}]}},"readme":"# CoffeeTe\n\n_Templating with CoffeeScript_\n\n## Installation\n\nOpen your cozy terminal and write:\n\n    git clone git://github.com/icetan/coffeete.git\n    cd coffeete\n\n### With NPM for Node.js\n\n    npm install\n\n### Or with Ender for the browser\n\n    ender build .\n\n## How\n\nIt is very simple and very little code. It uses the CoffeeScript compiler for\nstring interpolation. The tool chain: CoffeeTe -> CoffeeScript\n-> JavaScript.\n\n## Examples\n\n### Our template\n\n```\n<script id=\"about-me\" type=\"text/x-coffeete\">\n  <h1>#{cap name}</h1>\n  <p>\n    #{about}\n  </p>\n  <ul>\n    !{for hobby in hobbies\n      <li class=\"#{if _i%2 then 'even' else 'odd'}\">\n        #{hobby}\n      </li>\n    }!\n  </ul>\n</script>\n```\n\n### The view data\n\n```javascript\nvar view = {\n      name: \"christopher\"\n    , about: \"I like grapefriut.\"\n    , hobbies: [\"Computers\", \"Martial Arts\", \"Coffee\"]\n    , cap: function (str) {\n      return str.slice(0,1).toUpperCase()+str.slice(1);\n    }\n  };\n```\n\n### In the browser\n\n```javascript\nvar str = document.getElementById('about-me').text\n  // Compile a CoffeeTe string to a template function ready to recieve data.\n  , template = coffeete(str)\n  // Run our compiled template with the view data to get a ready HTML string.\n  , html = template(view);\n\n// Fill the page with our newly rendered HTML.\ndocument.getElementsByTagName('body')[0].innerHTML += html;\n```\n\n### With Node.js\n\n```javascript\nvar str = fs.readFileSync('about-me.chtml').toString()\n  , template = coffeete(str)\n  , html = template(view);\n\n// Write to a static HTML file or serve directly over HTTP.\nfs.writeFile('about-me.html', html);\n```\n\n### The result\n\n```html\n<h1>Christopher</h1>\n<p>\n  I like grapefriut.\n</p>\n<ul>\n  \n    <li class=\"odd\">\n      Computers\n    </li>\n  \n    <li class=\"even\">\n      Martial Arts\n    </li>\n  \n    <li class=\"odd\">\n      Coffee\n    </li>\n  \n</ul>\n```","maintainers":[{"name":"icetan","email":"c.freden@gmail.com"}],"time":{"modified":"2022-06-13T06:28:43.365Z","created":"2012-02-05T19:33:48.825Z","0.0.1":"2012-02-05T19:33:50.863Z","0.0.2":"2012-07-06T09:05:35.717Z","0.0.3":"2012-08-15T21:40:09.954Z","0.0.4":"2012-08-15T22:47:57.175Z"},"author":{"name":"Christopher Fredén","email":"c.freden@gmail.com"},"repository":{"type":"git","url":"https://github.com/icetan/coffeete.git"}}