{
  "name": "transformers",
  "version": "2.1.0",
  "description": "String/Data transformations for use in templating libraries, static site generators and web frameworks",
  "main": "lib/transformers.js",
  "scripts": {
    "pretest": "node test/update-package && npm install",
    "test": "mocha test/test.js -R spec"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/ForbesLindesay/transformers.git"
  },
  "author": {
    "name": "ForbesLindesay"
  },
  "license": "MIT",
  "readmeFilename": "README.md",
  "gitHead": "4b46e72cba3ad3403fd5ed3802d5472dcfa77311",
  "devDependencies": {
    "mocha": "~1.8",
    "expect.js": "~0.2",
    "swig": "*",
    "atpl": "*",
    "liquor": "*",
    "ejs": "*",
    "eco": "*",
    "jqtpl": "*",
    "hamljs": "*",
    "haml-coffee": "*",
    "whiskers": "*",
    "hogan.js": "*",
    "handlebars": "*",
    "underscore": "*",
    "walrus": "*",
    "mustache": "*",
    "mote": "*",
    "toffee": "*",
    "just": "*",
    "ect": "*",
    "jade": "*",
    "then-jade": "*",
    "dust": "*",
    "dustjs-linkedin": "*",
    "jazz": "*",
    "qejs": "*",
    "less": "*",
    "stylus": "*",
    "sass": "*",
    "marked": "*",
    "supermarked": "*",
    "markdown-js": "*",
    "markdown": "*",
    "coffee-script": "*",
    "cson": "*",
    "coffeekup": "*",
    "coffeecup": "*",
    "templayed": "*",
    "plates": "*",
    "dot": "*",
    "component-builder": "*",
    "html2jade": "*",
    "highlight.js": "*"
  },
  "dependencies": {
    "promise": "~2.0",
    "css": "~1.0.8",
    "uglify-js": "~2.2.5"
  },
  "readme": "[![Build Status](https://travis-ci.org/ForbesLindesay/transformers.png?branch=master)](https://travis-ci.org/ForbesLindesay/transformers)\r\n# transformers\r\n\r\n  String/Data transformations for use in templating libraries, static site generators and web frameworks.  This gathers the most useful transformations you can apply to text or data into one library with a consistent API.  Transformations can be pretty much anything but most are either compilers or templating engines.\r\n\r\n## Supported transforms\r\n\r\n  To use each of these transforms you will also need to install the associated npm module for that transformer.\r\n\r\n### Template engines\r\n\r\n  - [atpl](http://documentup.com/soywiz/atpl.js) - Compatible with twig templates\r\n  - [coffeecup](http://documentup.com/gradus/coffeecup) - pure coffee-script templates (fork of coffeekup)\r\n  - [dot](http://documentup.com/olado/doT) [(website)](https://github.com/Katahdin/dot-packer) - focused on speed\r\n  - [dust](http://documentup.com/akdubya/dustjs) [(website)](http://akdubya.github.com/dustjs/) - asyncronous templates\r\n  - [eco](http://documentup.com/sstephenson/eco) - Embedded CoffeeScript templates\r\n  - [ect](http://documentup.com/baryshev/ect) [(website)](http://ectjs.com/) - Embedded CoffeeScript templates\r\n  - [ejs](http://documentup.com/visionmedia/ejs) - Embedded JavaScript templates\r\n  - [haml](http://documentup.com/visionmedia/haml.js) [(website)](http://haml-lang.com/) - dry indented markup\r\n  - [haml-coffee](http://documentup.com/netzpirat/haml-coffee/) [(website)](http://haml-lang.com/) - haml with embedded CoffeeScript\r\n  - [handlebars](http://documentup.com/wycats/handlebars.js/) [(website)](http://handlebarsjs.com/) - extension of mustache templates\r\n  - [hogan](http://documentup.com/twitter/hogan.js) [(website)](http://twitter.github.com/hogan.js/) - Mustache templates\r\n  - [jade](http://documentup.com/visionmedia/jade) [(website)](http://jade-lang.com/) - robust, elegant, feature rich template engine\r\n  - [jazz](http://documentup.com/shinetech/jazz)\r\n  - [jqtpl](http://documentup.com/kof/jqtpl) [(website)](http://api.jquery.com/category/plugins/templates/) - extensible logic-less templates\r\n  - [JUST](http://documentup.com/baryshev/just) - EJS style template with some special syntax for layouts/partials etc.\r\n  - [liquor](http://documentup.com/chjj/liquor) - extended EJS with significant white space\r\n  - [mustache](http://documentup.com/janl/mustache.js) - logic less templates\r\n  - [QEJS](http://documentup.com/jepso/QEJS) - Promises + EJS for async templating\r\n  - [swig](http://documentup.com/paularmstrong/swig) [(website)](http://paularmstrong.github.com/swig/) - Django-like templating engine\r\n  - [templayed](http://documentup.com/archan937/templayed.js/) [(website)](http://archan937.github.com/templayed.js/) - Mustache focused on performance\r\n  - [toffee](http://documentup.com/malgorithms/toffee) - templating language based on coffeescript\r\n  - [underscore](http://documentup.com/documentcloud/underscore) [(website)](http://documentcloud.github.com/underscore/)\r\n  - [walrus](http://documentup.com/jeremyruppel/walrus) - A bolder kind of mustache\r\n  - [whiskers](http://documentup.com/gsf/whiskers.js/tree/) - logic-less focused on readability\r\n\r\n### Stylesheet Languages\r\n\r\n  - [less](http://documentup.com/cloudhead/less.js) [(website)](http://lesscss.org/) - LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.\r\n  - [stylus](http://documentup.com/learnboost/stylus) [(website)](http://learnboost.github.com/stylus/) - revolutionary CSS generator making braces optional\r\n  - [sass](http://documentup.com/visionmedia/sass.js) [(website)](http://sass-lang.com/) - Sassy CSS\r\n\r\n### Minifiers\r\n\r\n  - [uglify-js](http://documentup.com/mishoo/UglifyJS2) - No need to install anything, just minifies/beautifies JavaScript\r\n  - [uglify-css](https://github.com/visionmedia/css) - No need to install anything, just minifies/beautifies CSS\r\n  - ugilify-json - No need to install anything, just minifies/beautifies JSON\r\n\r\n### Other\r\n\r\n  - cdata - No need to install anything, just wraps input as `<![CDATA[${INPUT_STRING]]>` with the standard escape for `]]>` (`]]]]><![CDATA[>`).\r\n  - cdata-js - as `cdata`, but with surrounding comments suitable for inclusion into a HTML/JavaScript `<script>` block: `//<![CDATA[\\n${INPUT_STRING\\n//]]>`.\r\n  - cdata-css - as `cdata`, but with surrounding comments suitable for inclusion into a HTML/CSS `<style>` block: `/*<![CDATA[*/\\n${INPUT_STRING\\n/*]]>*/`.\r\n  - verbatim - No need to install anything, acts as a verbatim passthrough `${INPUT_STRING}`\r\n  - [coffee-script](http://coffeescript.org/) - `npm install coffee-script`\r\n  - [cson](https://github.com/bevry/cson) - coffee-script based JSON format\r\n  - markdown - You can use `marked`, `supermarked`, `markdown-js` or `markdown`\r\n  - [component-js](http://documentup.com/component/component) [(website)](http://component.io) - `npm install component-builder` options: `{development: false}`\r\n  - [component-css](http://documentup.com/component/component) [(website)](http://component.io) - `npm install component-builder` options: `{development: false}`\r\n  - [html2jade](http://documentup.com/donpark/html2jade) [(website)](http://html2jade.aaron-powell.com/) - `npm install html2jade` - Converts HTML back into jade\r\n\r\nPull requests to add more transforms will always be accepted providing they are open-source, come with unit tests, and don't cause any of the tests to fail.\r\n\r\n## API\r\n\r\n  The exported object `transformers` is a collection of named transformers.  To access an individual transformer just do:\r\n\r\n  ```javascript\r\n  var transformer = require('transformers')['transformer-name']\r\n  ```\r\n\r\n### Transformer\r\n\r\n  The following options are given special meaning by `transformers`:\r\n\r\n   - `filename` is set by transformers automatically if using the `renderFile` APIs.  It is used if `cache` is enabled.\r\n   - `cache` if true, the template function will be cached where possible (templates are still updated if you provide new options, so this can be used in most live applications).\r\n   - `sudoSync` used internally to put some asyncronous transformers into \"sudo syncronous\" mode.  Don't touch this.\r\n   - `minify` if set to true on a transformer that isn't a minifier, it will cause the output to be minified.  e.g. `coffeeScript.renderSync(str, {minify: true})` will result in minified JavaScript.\r\n\r\n#### Transformer.engines\r\n\r\n  Returns an array of engines that can be used to power this transformer.  The first of these that's installed will be used for the transformation.\r\n\r\n  To enable a transformation just take `[engine] = Transformer.engines[0]` and then do `npm install [engine]`.  If `[engine]` is `.` there is no need to install an engine from npm to use the transformer.\r\n\r\n#### Transformer.render(str, options, cb)\r\n\r\n  Tranform the string `str` using the `Transformer` with the provided options and call the callback `cb(err, res)`.\r\n\r\n  If no `cb` is provided, this method returns a [promises/A+](http://promises-aplus.github.com/promises-spec/) promise.\r\n\r\n#### Transformer.renderSync(str, options)\r\n\r\n  Synchronous version of `Transformer.render`\r\n\r\n#### Transformer.renderFile(filename, options, cb)\r\n\r\n  Reads the file at filename into `str` and sets `options.filename = filename` then calls `Transform.render(str, options, cb)`.\r\n\r\n  If no `cb` is provided, this method returns a [promises/A+](http://promises-aplus.github.com/promises-spec/) promise.\r\n\r\n#### Tranformer.renderFileSync(filename, options)\r\n\r\n  Synchronous version of `Tranformer.renderFile`\r\n\r\n#### Transformer.outputFormat\r\n\r\n  A string, one of:\r\n\r\n   - `'xml'`\r\n   - `'css'`\r\n   - `'js'`\r\n   - `'json'`\r\n   - `'text'`\r\n\r\nAdding to this list will **not** result in a major version change, so you should handle unexpected types gracefully (I'd suggest default to assuming `'text'`).\r\n\r\n#### Transformer.sync\r\n\r\n  `true` if the transformer can be used syncronously, `false` otherwise.\r\n\r\n## Libraries that don't work synchronously\r\n\r\n  The following transformations will always throw an exception if you attempt to run them synchronously:\r\n\r\n   1. dust\r\n   2. qejs\r\n   3. html2jade\r\n\r\nThe following transformations sometimes throw an exception if run syncronously, typically they only throw an exception if you are doing something like including another file.  If you are not doing the things that cause them to fail then they are consistently safe to use syncronously.\r\n\r\n   - jade (only when using `then-jade` instead of `jade`)\r\n   - less (when `@import` is used with a url instead of a filename)\r\n   - jazz (When one of the functions passed as locals is asyncronous)\r\n\r\nThe following libraries look like they might sometimes throw exceptions when used syncronously (if you read the source) but they never actually do so:\r\n\r\n   - just\r\n   - ect\r\n   - stylus",
  "bugs": {
    "url": "https://github.com/ForbesLindesay/transformers/issues"
  },
  "homepage": "https://github.com/ForbesLindesay/transformers",
  "_id": "transformers@2.1.0",
  "_from": "transformers@2.1.0"
}
