{"name":"directory-encoder","description":"Encode a directory of images to CSS","version":"0.7.2","homepage":"https://github.com/filamentgroup/directory-encoder","author":{"name":"John Bender/Jeffrey Lembeck/Filament Group","email":"thegroup@filamentgroup.com"},"repository":{"type":"git","url":"git+https://github.com/filamentgroup/directory-encoder.git"},"bugs":{"url":"https://github.com/filamentgroup/directory-encoder/issues"},"licenses":"MIT","main":"lib/directory-encoder","engines":{"node":">= 0.10.0"},"scripts":{"test":"grunt travis --verbose"},"dependencies":{"fs-extra":"^0.23.1","handlebars":"^1.3.0","img-stats":"^0.5.2"},"devDependencies":{"grunt":"^0.4.5","grunt-cli":"^0.1.13","grunt-contrib-jshint":"^0.11.1","grunt-contrib-nodeunit":"^0.4.1","grunt-contrib-watch":"^0.6.1","lodash":"^2.4.0"},"keywords":[],"gitHead":"d1ddc946b66ce978382c8aabdb2185f90d71c891","_id":"directory-encoder@0.7.2","_shasum":"59b4e2aa4f25422f6c63b527b462f5e2d0dd2c58","_from":".","_npmVersion":"3.1.3","_nodeVersion":"0.10.40","_npmUser":{"name":"jlembeck","email":"jlembeck@gmail.com"},"dist":{"shasum":"59b4e2aa4f25422f6c63b527b462f5e2d0dd2c58","tarball":"http://registry-npm.ywwl.com/directory-encoder/download/directory-encoder-0.7.2.tgz","integrity":"sha512-Z6wL7buaFG6Vnj/E87d/vYnJut3GD1+DkXXkuid/k5/me1nzO42ijrRN8zeXAVdmzREgtx3fAi7Q1tV1jNd0Dw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmCORF5D2kIxtSK4WfbiIpjP4x30/tIWMGapPgwolQ2AiAqmy9fgYZa4S46rQlP6eqwgWOy5CN+GlSSVUgRg+7BWQ=="}],"size":11169,"noattachment":false,"key":"/directory-encoder/-/directory-encoder-0.7.2.tgz"},"maintainers":[{"name":"filamentgroup","email":"thegroup@filamentgroup.com"},{"name":"jlembeck","email":"jlembeck@gmail.com"}],"directories":{},"readme":"# directory-encoder [![Build Status](https://secure.travis-ci.org/filamentgroup/directory-encoder.png?branch=master)](http://travis-ci.org/filamentgroup/directory-encoder)\n\n[![Filament Group](http://filamentgroup.com/images/fg-logo-positive-sm-crop.png) ](http://www.filamentgroup.com/)\n\nEncode a directory of PNG or SVG images to CSS\n\n## Getting Started\nInstall the module with: `npm install directory-encoder`\n\n```javascript\nvar DirectoryEncoder = require('directory-encoder');\nvar de = new DirectoryEncoder( source, destinationCSSFile, {\n\t\t\tpngfolder: pngfolder, //in case you need to link out for PNGs, like when the datauri is way too long\n\t\t\tcustomselectors: { \"foo\": [\".bar\", \".baz\"]}, \n\t\t\tprefix: \".icon-\", // used to prefix the name of the file for the CSS classname, .icon- is the default\n\t\t\ttemplatePrepend: \"/* start of icon-list */\", // this string is prepended to the destinationCSSFile, defaults to \"\"\n\t\t\thandlebarsCallback: function(hbs) { /* configure handlebars, with custom helpers for example */ }, // callback to configure handlebars\n\t\t\ttemplate: template.hbs, //template in handlebars, FANCY!\n\t\t\ttemplateAppend: \"/* end of icon-list */\", // this string is appended to the destinationCSSFile, defaults to \"\"\n\t\t\tnoencodepng: false // turn this to true if you want no datauris for pngs, just links out to png files\n\t\t});\nde.encode(); // \"Guitar solo -- File outputted\"\n```\n\n## Documentation\n\n### Constructor\n\nTakes three arguments, source directory for encoding/an array of files\nyou'd like to encode, destination css\nfile for when it writes, and an options hash that includes a spot for\ncustomselectors, a hbs template in case you want to get nuts with your\ncss, where the pngs are located if you want to link out to them (or you\ndon't have a choice because the data uri is bigger than 32k), and a\nswitch to turn off datauris for pngs.\n\n### encode\n\nAll the magic happens here.\n\n## Examples\n```\nvar de = new DirectoryEncoder( source, destinationCSSFile, {\n\t\t\tpngfolder: pngfolder, //in case you need to link out for PNGs, like when the datauri is way too long\n\t\t\tcustomselectors: { \"foo\": [\".bar\", \".baz\"]}, \n\t\t\ttemplate: template.hbs, //template in handlebars, FANCY!\n\t\t\tnoencodepng: false // turn this to true if you want no datauris for pngs, just links out to png files\n\t\t});\nde.encode(); // \"Guitar solo -- File outputted\"\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n\n* 0.7.0  Add templateAppend and templatePrepend options\n* 0.6.0  Fix encoding brackets and ability to take an array\n* 0.5.0  PNGpath\n* 0.4.0  Width/Height from template\n* 0.3.0  Adding custom selectors that allow for wildcards\n* 0.2.0  Adding switchable icon name prefixes\n* 0.1.0  Woo\n\n## License\nCopyright (c) 2013 John Bender/Jeffrey Lembeck/Filament Group\nLicensed under the MIT license.\n","publish_time":1439235725677,"_cnpm_publish_time":1439235725677,"dist-tags":{"latest":"0.9.2"}}