{"name":"directory-encoder","description":"Encode a directory of images to CSS","version":"0.8.0","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":"0385a1f80ad98673c8262ccd7e30c1abc94e852b","_id":"directory-encoder@0.8.0","_shasum":"2fb288ab21add2b676461e45201adaa19935b186","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.3","_npmUser":{"name":"jlembeck","email":"jlembeck@gmail.com"},"dist":{"shasum":"2fb288ab21add2b676461e45201adaa19935b186","tarball":"http://registry-npm.ywwl.com/directory-encoder/download/directory-encoder-0.8.0.tgz","integrity":"sha512-yAmJ2cDFCV1XGhO+DMH/3TarZRBiR4rEKDy5P/0raUpiEAW3RpyoHApmhI90heW68THyNwhws5hbbIafXfoYfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBtIA+88CV0S1jQY+qnU91BLc73DU5nh6L2thF87S01RAiEA8ztKtwtr+I6E6u5PU0QIIPwPrGnMtSSuVkSWTzvzcuY="}],"size":11418,"noattachment":false,"key":"/directory-encoder/-/directory-encoder-0.8.0.tgz"},"maintainers":[{"name":"filamentgroup","email":"thegroup@filamentgroup.com"},{"name":"jlembeck","email":"jlembeck@gmail.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/directory-encoder-0.8.0.tgz_1454351630639_0.3965614994522184"},"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":1454351631163,"_cnpm_publish_time":1454351631163,"dist-tags":{"latest":"0.9.2"}}