{"name":"es6-templates","version":"0.0.2","description":"ES6 template strings compiled to ES5.","main":"lib/index.js","directories":{"test":"test"},"repository":{"type":"git","url":"git@github.com:square/es6-templates.git"},"dependencies":{"esprima":"git://github.com/ariya/esprima.git#harmony","recast":"~0.5.12","through":"~2.3.4","ast-types":"^0.3.23"},"devDependencies":{"example-runner":"0.1.0"},"scripts":{"test":"node test/runner.js"},"author":{"name":"Square, Inc."},"license":"Apache 2","bugs":{"url":"https://github.com/square/es6-templates/issues"},"homepage":"https://github.com/square/es6-templates","_id":"es6-templates@0.0.2","dist":{"shasum":"539fede5eb00358589bf6b8ce4906091db5586e1","tarball":"http://registry-npm.ywwl.com/es6-templates/download/es6-templates-0.0.2.tgz","integrity":"sha512-fAfGzUCfrRzT+ArUTWUE3BoxI6hJDeze1PcCsi95DSuK02yUBpp6tOA+Olwh04K0LSCczT/9QxKEvkYEw7rKCA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEIc8XXWhKuNErDJ3fnIVgmVRddeGNp00bimAc//SesZAiEAnVEqG09uWcZD1J+DOO/8TCuuhJe3kcIVKtyRSa6nu5c="}],"size":4129,"noattachment":false,"key":"/es6-templates/-/es6-templates-0.0.2.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"eventualbuddha","email":"me@brian-donovan.com"},"maintainers":[{"name":"eventualbuddha","email":"me@brian-donovan.com"}],"readme":"# es6-templates\n\nCompiles JavaScript written using template strings to use ES5-compatible\nsyntax. For example, this:\n\n```js\nvar name = \"Nicholas\",\n    msg = `Hello, ${name}!`;\n\nconsole.log(msg);    // \"Hello, Nicholas!\"\n```\n\ncompiles to this:\n\n```js\nvar name = \"Nicholas\",\n    msg = \"Hello, \" + name + \"!\";\n\nconsole.log(msg);    // \"Hello, Nicholas!\"\n```\n\nFor more information about the proposed syntax, see the [TC39 wiki page on\ntemplate strings](http://tc39wiki.calculist.org/es6/template-strings/).\n\n## Install\n\n```\n$ npm install es6-templates\n```\n\n## Usage\n\n```js\n$ node\n> var compile = require('es6-templates').compile;\n> compile('`Hey, ${name}!`')\n{ 'code': ..., 'map': ... }\n```\n\nWithout interpolation:\n\n```js\n`Hey!`\n// becomes\n'\"Hey!\"'\n```\n\nWith interpolation:\n\n```js\n`Hey, ${name}!`\n// becomes\n\"Hey, \" + name + \"!\"\n```\n\nWith a tag expression:\n\n```js\nescape `<a href=\"${href}\">${text}</a>`\n// becomes\nescape(function() {\n  var strings = [\"\\u003Ca href=\\\"\", \"\\\"\\u003E\", \"\\u003C/a\\u003E\"];\n  strings.raw = [\"\\u003Ca href=\\\"\", \"\\\"\\u003E\", \"\\u003C/a\\u003E\"];\n  return strings;\n}(), href, text);\n```\n\nOr work directly with the AST:\n\n```js\n$ node\n> var transform = require('es6-templates').transform;\n> transform(inputAST)\n```\n\nTransforming ASTs is best done using [recast][recast] to preserve formatting\nwhere possible and for generating source maps.\n\n## Browserify\n\nBrowserify support is built in.\n\n```\n$ npm install es6-templates  # install local dependency\n$ browserify -t es6-templates $file\n```\n\n## Contributing\n\n[![Build Status](https://travis-ci.org/esnext/es6-templates.svg?branch=master)](https://travis-ci.org/esnext/es6-templates)\n\n### Setup\n\nFirst, install the development dependencies:\n\n```\n$ npm install\n```\n\nThen, try running the tests:\n\n```\n$ npm test\n```\n\n### Pull Requests\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nAny contributors to the master es6-templates repository must sign the\n[Individual Contributor License Agreement (CLA)][cla].  It's a short form that\ncovers our bases and makes sure you're eligible to contribute.\n\n[cla]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1\n\nWhen you have a change you'd like to see in the master repository, [send a pull\nrequest](https://github.com/esnext/es6-templates/pulls). Before we merge\nyour request, we'll make sure you're in the list of people who have signed a\nCLA.\n\n[recast]: https://github.com/benjamn/recast\n","publish_time":1397578562010,"_cnpm_publish_time":1397578562010,"dist-tags":{"latest":"0.2.3"}}