{
  "name": "magic-templates",
  "description": "Templating framework for NodeJS inspired by Django templates.",
  "version": "0.1.1",
  "homepage": "https://github.com/Kami/magic-templates",
  "repository": {
    "type": "git",
    "url": "git://github.com/Kami/magic-templates.git"
  },
  "author": {
    "name": "Tomaz Muraus",
    "email": "tomaz+npm@tomaz.me"
  },
  "main": "./index",
  "directories": {
    "lib": "./lib"
  },
  "engines": {
    "node": ">= 0.1.95"
  },
  "readme": "Magic templates\n===============\n\nTemplating framework for NodeJS inspired by Django templates.\n\nNote: This is a [strobe-templates](https://github.com/skid/strobe-templates)\nfork with some additional features and bug fixes.\n\nFor now, Strobe Templates have the following template tags:\n\n    {% for x in y %}{% endfor %}\n    {% if x %}{% else if y %}{% else %}{% endif %}\n    {% extends template_name %}\n    {% include template_name %}\n    {% block block_name %}\n\nYou can define your own template tags in the \"tags.js\" module. Template inheritance is done in the same way as Django, only in an asynchronous way. Strobe templates support caching of parsed templates. \nOne important difference from Django templates is that the render() method returns an array of strings. It's your job to call .join(\"\") on the rendered output.\n\nRequirements\n============\n\n* node.js >= 0.1.95 (works with lesser versions if you remove the buffer.toString in the load method of the template prototype)\n\nSimple usage example\n=========================\n\n    var sys = require('sys')\n      , templates = require('template');\n\n    templates.setTemplatesDir('/path/to/templates/dir');\n    templates.setDebug(false);\n\n    var context = { foo: 1, bar: 2 };\n    var template = new templates.Template('path/to/template.html');\n    template.load( function( err, template ) {\n      if( err ) // load/parse errors (invalid filename, bad template syntax)\n        sys.puts( err );\n      else\n        template.render( context, function( err, output ) {\n          if( err ) // render errors (invalid filename in context variables, bad context variables)\n            sys.puts( err );\n          else \n            sys.puts( output.join(\"\") );\n        });\n    });\n\nAdding some default values to all context instances (Something like a context_processor in Django)\n\n    var Context = require('template').Context;\n    // This will be available in all context insances\n    Context.addToDefault({ MEDIA_URL: \"http://media.url/\" });\n    // Clear the defaults\n    Context.clearDefault();\n\nRun a benchmark and a test output\n=================================\n\n    $ node tests/run.js\n\nUsed Code\n=========\n\n* Visionmedia's [ext](http://github.com/visionmedia/ext.js library) (extensions to Object and sprintf)\n\nTodos\n=====\n\n* Add filters for variable tags\n\nLicense\n=======\n\n(The MIT License)\n\nCopyright (c) 2010 Dusko Jordanovski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
  "readmeFilename": "README.md",
  "bugs": {
    "url": "https://github.com/Kami/magic-templates/issues"
  },
  "_id": "magic-templates@0.1.1",
  "_shasum": "7679a33dc8d28f3b06570766ef3acb1166eebadd",
  "_from": "magic-templates@= 0.1.1",
  "_resolved": "https://registry.npmjs.org/magic-templates/-/magic-templates-0.1.1.tgz"
}
