You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
4.1 KiB
78 lines
4.1 KiB
{
|
|
"name": "docpad-plugin-handlebars",
|
|
"version": "2.2.1",
|
|
"description": "Adds support for the Handlebars templating engine to DocPad.",
|
|
"homepage": "http://docpad.org/plugin/handlebars",
|
|
"keywords": [
|
|
"docpad",
|
|
"docpad-plugin",
|
|
"handlebars",
|
|
"templating",
|
|
"templates",
|
|
"render",
|
|
"rendering"
|
|
],
|
|
"author": {
|
|
"name": "Mike Moulton",
|
|
"email": "mike@meltmedia.com",
|
|
"url": "http://meltmedia.com"
|
|
},
|
|
"maintainers": [
|
|
{
|
|
"name": "Mike Moulton",
|
|
"email": "mike@meltmedia.com",
|
|
"url": "https://github.com/mmoulton"
|
|
},
|
|
{
|
|
"name": "Benjamin Lupton",
|
|
"email": "b@lupton.cc",
|
|
"url": "https://github.com/balupton"
|
|
}
|
|
],
|
|
"contributors": [
|
|
{
|
|
"name": "Mike Moulton",
|
|
"email": "mike@meltmedia.com",
|
|
"url": "https://github.com/mmoulton"
|
|
},
|
|
{
|
|
"name": "Benjamin Lupton",
|
|
"email": "b@lupton.cc",
|
|
"url": "https://github.com/balupton"
|
|
},
|
|
{
|
|
"name": "Tobias Birmili",
|
|
"email": "birmili@mecodia.de",
|
|
"url": "https://github.com/toabi"
|
|
},
|
|
{
|
|
"name": "Gilles Bouthenot",
|
|
"url": "https://github.com/gbouthenot"
|
|
}
|
|
],
|
|
"bugs": {
|
|
"url": "http://docpad.org/plugin/handlebars/issues"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/docpad/docpad-plugin-handlebars.git"
|
|
},
|
|
"dependencies": {
|
|
"handlebars": "~1.0.10"
|
|
},
|
|
"devDependencies": {
|
|
"coffee-script": "~1.4.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=0.4",
|
|
"docpad": "6.x"
|
|
},
|
|
"main": "./out/handlebars.plugin.js",
|
|
"scripts": {
|
|
"test": "node ./out/handlebars.test.js"
|
|
},
|
|
"readme": "# Handlebars Plugin for DocPad\nAdds support for the [Handlebars](http://handlebarsjs.com/) templating engine to [DocPad](https://docpad.org)\n\nConvention: `.inlinejs|js|anything.handlebars|hbs|hb`\n\n\n## Install\n\n```\nnpm install --save docpad-plugin-handlebars\n```\n\n\n## Configuration\n\n### Getting helpers and partials to work\n\nFor the plugin to support helpers and partials, you'll have to add something like the following to your [docpad configuration file](http://docpad.org/docs/config) manually:\n\n``` coffee\n# ...\nplugins:\n\thandlebars:\n\t\thelpers:\n\t\t\t# Expose docpads 'getBlock' function to handlebars\n\t\t\tgetBlock: (type, additional...) ->\n\t\t\t\tadditional.pop() # remove the hash object\n\t\t\t\t@getBlock(type).add(additional).toHTML()\n\t\tpartials:\n\t\t\ttitle: '<h1>{{document.title}}</h1>'\n\t\t\tgoUp: '<a href=\"#\">Scroll up</a>'\n# ...\n```\n\n\n## Usage as precompiler\n\nIf the document extension is `.inlinejs|js.handlebars|hbs|hb`, the plugin will produce a precompiled template. In this case, you can customise the precompiled template via the following:\n\n``` coffee\n# ...\nplugins:\n\thandlebars:\n\t\tprecompileOpts:\n\t\t\twrapper: \"default\"\n# ...\n```\n\nAvailable values for the wrapper option are:\n\n- `\"default\"`: Produces a handlebars wrapper like:\n\t``` javascript\n\t(function() {\n\t\tvar template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\n\t\ttemplates['theSlugOfTheFile'] = template(function (Handlebars,depth0,helpers,partials,data) {\n\t\t\t...\n\t\t})\n\t})();\n\t```\n\n- `\"amd\"`: Produces a AMD handlebars wrapper like:\n\t``` javascript\n\tdefine(['handlebars'], function(Handlebars) {\n\t\tvar template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};\n\t\ttemplates['theSlugOfTheFile'] = template(function (Handlebars,depth0,helpers,partials,data) {\n\t\t\t...\n\t\t});\n\t});\n\t```\n\n- `\"none\"`: Produces a basic wrapper like:\n\t``` javascript\n\tfunction (Handlebars,depth0,helpers,partials,data) {\n\t\t...\n\t}\n\t```\n\n\n\n## History\n\nYou can discover the history inside the `History.md` file\n\n\n## License\nLicensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)\n<br/>Copyright © 2012 [Mike Moulton](http://meltmedia.com)",
|
|
"readmeFilename": "README.md",
|
|
"_id": "docpad-plugin-handlebars@2.2.1",
|
|
"_from": "docpad-plugin-handlebars@~2.2.1"
|
|
}
|