{"name":"directory-encoder","description":"Encode a directory of images to CSS","version":"0.9.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"},"license":"MIT","main":"lib/directory-encoder","engines":{"node":">= 0.10.0"},"scripts":{"test":"grunt travis --verbose"},"dependencies":{"fs-extra":"^1.0.0","handlebars":"^4.0.6","img-stats":"^0.5.2"},"devDependencies":{"grunt":"^1.0.1","grunt-cli":"^1.2.0","grunt-contrib-jshint":"^0.11.1","grunt-contrib-nodeunit":"^1.0.0","grunt-contrib-watch":"^1.0.0","lodash":"^2.4.0"},"keywords":[],"gitHead":"5bad6431e7f31ee70be0aebeaeb35987366c79ee","_id":"directory-encoder@0.9.2","_shasum":"20de4da495043f43e5c7e213c1405cb0579147a5","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"zachleat","email":"zachleatherman@gmail.com"},"dist":{"shasum":"20de4da495043f43e5c7e213c1405cb0579147a5","tarball":"http://registry-npm.ywwl.com/directory-encoder/download/directory-encoder-0.9.2.tgz","integrity":"sha512-G5VikRWVQvFCunEADXeLMb7F3Pr2Gtm0+shbnlxtB7rlUbjfSfIlljp1cPTaaKtFHI1uY4nO1bADxhIsRd+2Tg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGIslHwFK7hRlKsPAgQLYaDMXBTHuO0DMvu9+TUrMy9AAiEAhQe4jD8ck7WiqI0CookEn/fz+Qu8iy05UO+crnlq+pE="}],"size":69821,"noattachment":false,"key":"/directory-encoder/-/directory-encoder-0.9.2.tgz"},"maintainers":[{"name":"filamentgroup-admin","email":"thegroup@filamentgroup.com"},{"name":"johnmbender","email":"john.m.bender@gmail.com"},{"name":"maggiewachs","email":"maggie@filamentgroup.com"},{"name":"scottjehl","email":"scott@filamentgroup.com"},{"name":"zachleat","email":"zachleatherman@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/directory-encoder-0.9.2.tgz_1498501959319_0.7100923801772296"},"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":1498501960486,"_cnpm_publish_time":1498501960486,"dist-tags":{"latest":"0.9.2"}}