zulip/node_modules/handlebars/package.json

75 lines
19 KiB
JSON
Raw Normal View History

{
"name": "handlebars",
"barename": "handlebars",
"version": "1.3.0",
"description": "Handlebars provides the power necessary to let you build semantic templates effectively with no frustration",
"homepage": "http://www.handlebarsjs.com/",
"keywords": [
"handlebars",
"mustache",
"template",
"html"
],
"repository": {
"type": "git",
"url": "https://github.com/wycats/handlebars.js.git"
},
"author": {
"name": "Yehuda Katz"
},
"license": "MIT",
"readmeFilename": "README.markdown",
"engines": {
"node": ">=0.4.7"
},
"dependencies": {
"optimist": "~0.3",
"uglify-js": "~2.3"
},
"optionalDependencies": {
"uglify-js": "~2.3"
},
"devDependencies": {
"async": "~0.2.9",
"aws-sdk": "~1.5.0",
"benchmark": "~1.0",
"dustjs-linkedin": "~2.0.2",
"eco": "~1.1.0-rc-3",
"grunt": "~0.4.1",
"grunt-cli": "~0.1.10",
"grunt-contrib-clean": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-jshint": "0.x",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-watch": "~0.5.3",
"grunt-saucelabs": "~4.1.2",
"es6-module-packager": "0.x",
"jison": "~0.3.0",
"keen.io": "0.0.3",
"mocha": "*",
"mustache": "~0.7.2",
"semver": "~2.1.0",
"underscore": "~1.5.1"
},
"main": "lib/index.js",
"bin": {
"handlebars": "bin/handlebars"
},
"scripts": {
"test": "grunt"
},
"readme": "[![Travis Build Status](https://travis-ci.org/wycats/handlebars.js.png?branch=master)](https://travis-ci.org/wycats/handlebars.js)\n[![Selenium Test Status](https://saucelabs.com/buildstatus/handlebars)](https://saucelabs.com/u/handlebars)\n\nHandlebars.js\n=============\n\nHandlebars.js is an extension to the [Mustache templating\nlanguage](http://mustache.github.com/) created by Chris Wanstrath.\nHandlebars.js and Mustache are both logicless templating languages that\nkeep the view and the code separated like we all know they should be.\n\nCheckout the official Handlebars docs site at\n[http://www.handlebarsjs.com](http://www.handlebarsjs.com).\n\nInstalling\n----------\nInstalling Handlebars is easy. Simply download the package [from the official site](http://handlebarsjs.com/) or the [bower repository][bower-repo] and add it to your web pages (you should usually use the most recent version).\n\nAlternatively, if you prefer having the latest version of handlebars from\nthe 'master' branch, passing builds of the 'master' branch are automatically\npublished to S3. You may download the latest passing master build by grabbing\na `handlebars-latest.js` file from the [builds page][builds-page]. When the\nbuild is published, it is also available as a `handlebars-gitSHA.js` file on\nthe builds page if you need a version to refer to others.\n`handlebars-runtime.js` builds are also available.\n\n**Note**: The S3 builds page is provided as a convenience for the community,\nbut you should not use it for hosting Handlebars in production.\n\nUsage\n-----\nIn general, the syntax of Handlebars.js templates is a superset\nof Mustache templates. For basic syntax, check out the [Mustache\nmanpage](http://mustache.github.com/mustache.5.html).\n\nOnce you have a template, use the `Handlebars.compile` method to compile\nthe template into a function. The generated function takes a context\nargument, which will be used to render the template.\n\n```js\nvar source = \"<p>Hello, my name is {{name}}. I am from {{hometown}}. I have \" +\n \"{{kids.length}} kids:</p>\" +\n \"<ul>{{#kids}}<li>{{name}} is {{age}}</li>{{/kids}}</ul>\";\nvar template = Handlebars.compile(source);\n\nvar data = { \"name\": \"Alan\", \"hometown\": \"Somewhere, TX\",\n \"kids\": [{\"name\": \"Jimmy\", \"age\": \"12\"}, {\"name\": \"Sally\", \"age\": \"4\"}]};\nvar result = template(data);\n\n// Would render:\n// <p>Hello, my name is Alan. I am from Somewhere, TX. I have 2 kids:</p>\n// <ul>\n// <li>Jimmy is 12</li>\n// <li>Sally is 4</li>\n// </ul>\n```\n\n\nRegistering Helpers\n-------------------\n\nYou can register helpers that Handlebars will use when evaluating your\ntemplate. Here's an example, which assumes that your objects have a URL\nembedded in them, as well as the text for a link:\n\n```js\nHandlebars.registerHelper('link_to', function() {\n return \"<a href='\" + this.url + \"'>\" + this.body + \"</a>\";\n});\n\nvar context = { posts: [{url: \"/hello-world\", body: \"Hello World!\"}] };\nvar source = \"<ul>{{#posts}}<li>{{{link_to}}}</li>{{/posts}}</ul>\"\n\nvar template = Handlebars.compile(source);\ntemplate(context);\n\n// Would render:\n//\n// <ul>\n// <li><a href='/hello-world'>Hello World!</a></li>\n// </ul>\n```\n\nHelpers take precedence over fields defined on the context. To access a field\nthat is masked by a helper, a path reference may be used. In the example above\na field named `link_to` on the `context` object would be referenced using:\n\n```\n{{./link_to}}\n```\n\nEscaping\n--------\n\nBy default, the `{{expression}}` syntax will escape its contents. This\nhelps to protect you against accidental XSS problems caused by malicious\ndata passed from the server as JSON.\n\nTo explicitly *not* escape the contents, use the triple-mustache\n(`{{{}}}`). You have seen this used in the above example.\n\n\nDifferences Between Handlebars.js and Mustache\n----------------------------------------------\nHandlebars.js adds a couple of additional features to make writing\ntemplates easier and also cha
"bugs": {
"url": "https://github.com/wycats/handlebars.js/issues"
},
"_id": "handlebars@1.3.0",
"_from": "handlebars@1.3.0",
"dist": {
"shasum": "9e9b130a93e389491322d975cf3ec1818c37ce34"
},
"_resolved": "https://registry.npmjs.org/handlebars/-/handlebars-1.3.0.tgz"
}