{"_id":"postcss-discard-font-face","_rev":"147709","name":"postcss-discard-font-face","description":"Discard font faces by type, with PostCSS.","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"trysound","email":"trysound@yandex.ru"}],"time":{"modified":"2021-06-03T11:30:38.000Z","created":"2015-04-02T15:38:08.584Z","3.0.0":"2016-05-11T11:27:45.175Z","2.1.0":"2015-07-31T12:33:21.977Z","2.0.1":"2015-06-22T19:13:46.082Z","2.0.0":"2015-06-12T16:01:07.484Z","1.0.1":"2015-04-02T15:41:08.018Z","1.0.0":"2015-04-02T15:38:08.584Z"},"users":{},"author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"repository":{"type":"git","url":"git://github.com/ben-eb/postcss-discard-font-face.git"},"versions":{"3.0.0":{"name":"postcss-discard-font-face","version":"3.0.0","description":"Discard font faces by type, with PostCSS.","main":"index.js","scripts":{"lint":"jshint index.js --reporter node_modules/jshint-stylish/stylish.js","test":"tape test.js | tap-spec"},"files":["index.js","LICENSE-MIT"],"keywords":["css","font","filter","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"jshint":"^2.9.2","jshint-stylish":"^2.2.0","tap-spec":"^4.1.1","tape":"^4.5.1"},"homepage":"https://github.com/ben-eb/postcss-discard-font-face","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"}],"repository":{"type":"git","url":"git://github.com/ben-eb/postcss-discard-font-face.git"},"dependencies":{"balanced-match":"^0.4.1","postcss":"^5.0.21"},"gitHead":"939c8065e32c4d4bddb14dd13b69f22f95ef9c80","bugs":{"url":"https://github.com/ben-eb/postcss-discard-font-face/issues"},"_id":"postcss-discard-font-face@3.0.0","_shasum":"e2037a6a4d8b29b04ae97483ffea2c9405f9ea1c","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.1","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"dist":{"shasum":"e2037a6a4d8b29b04ae97483ffea2c9405f9ea1c","size":3661,"noattachment":false,"key":"/postcss-discard-font-face/-/postcss-discard-font-face-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-discard-font-face/download/postcss-discard-font-face-3.0.0.tgz"},"maintainers":[{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"trysound","email":"trysound@yandex.ru"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/postcss-discard-font-face-3.0.0.tgz_1462966063870_0.8965391735546291"},"directories":{},"publish_time":1462966065175,"_cnpm_publish_time":1462966065175,"_hasShrinkwrap":false},"2.1.0":{"name":"postcss-discard-font-face","version":"2.1.0","description":"Discard font faces by type, with PostCSS.","main":"index.js","scripts":{"lint":"jshint index.js --reporter node_modules/jshint-stylish/stylish.js","test":"tape test.js | tap-spec"},"keywords":["css","font","filter","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"jshint":"^2.6.3","jshint-stylish":"^1.0.1","tap-spec":"^2.2.2","tape":"^3.5.0"},"homepage":"https://github.com/ben-eb/postcss-discard-font-face","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"}],"repository":{"type":"git","url":"git://github.com/ben-eb/postcss-discard-font-face.git"},"dependencies":{"balanced-match":"^0.2.0","postcss":"^4.1.11"},"gitHead":"2a5ce87b0ec6362cfcd5b3836f395955d8cc396a","bugs":{"url":"https://github.com/ben-eb/postcss-discard-font-face/issues"},"_id":"postcss-discard-font-face@2.1.0","_shasum":"fbf85414cb0f2c997069616cda754793be565de8","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"dist":{"shasum":"fbf85414cb0f2c997069616cda754793be565de8","size":3677,"noattachment":false,"key":"/postcss-discard-font-face/-/postcss-discard-font-face-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-discard-font-face/download/postcss-discard-font-face-2.1.0.tgz"},"maintainers":[{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"trysound","email":"trysound@yandex.ru"}],"directories":{},"publish_time":1438346001977,"_cnpm_publish_time":1438346001977,"_hasShrinkwrap":false},"2.0.1":{"name":"postcss-discard-font-face","version":"2.0.1","description":"Discard font faces by type, with PostCSS.","main":"index.js","scripts":{"lint":"jshint index.js --reporter node_modules/jshint-stylish/stylish.js","test":"tape test.js | tap-spec"},"keywords":["css","font","filter","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"jshint":"^2.6.3","jshint-stylish":"^1.0.1","tap-spec":"^2.2.2","tape":"^3.5.0"},"homepage":"https://github.com/ben-eb/postcss-discard-font-face","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"}],"repository":{"type":"git","url":"git://github.com/ben-eb/postcss-discard-font-face.git"},"dependencies":{"balanced-match":"^0.2.0","postcss":"^4.1.11"},"gitHead":"d8e4f8cf4fb8f745946af1c0cebc245377e31b1d","bugs":{"url":"https://github.com/ben-eb/postcss-discard-font-face/issues"},"_id":"postcss-discard-font-face@2.0.1","_shasum":"a0a4d11c5fc33394b4424121a09282ce9bf3f166","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.2","_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"maintainers":[{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"trysound","email":"trysound@yandex.ru"}],"dist":{"shasum":"a0a4d11c5fc33394b4424121a09282ce9bf3f166","size":3193,"noattachment":false,"key":"/postcss-discard-font-face/-/postcss-discard-font-face-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-discard-font-face/download/postcss-discard-font-face-2.0.1.tgz"},"directories":{},"publish_time":1435000426082,"_cnpm_publish_time":1435000426082,"_hasShrinkwrap":false},"2.0.0":{"name":"postcss-discard-font-face","version":"2.0.0","description":"Discard font faces by type, with PostCSS.","main":"index.js","scripts":{"lint":"jshint index.js --reporter node_modules/jshint-stylish/stylish.js","test":"tape test.js | tap-spec"},"keywords":["css","font","filter","postcss","postcss-plugin"],"license":"MIT","devDependencies":{"jshint":"^2.6.3","jshint-stylish":"^1.0.1","tap-spec":"^2.2.2","tape":"^3.5.0"},"homepage":"https://github.com/ben-eb/postcss-discard-font-face","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru"}],"repository":{"type":"git","url":"git://github.com/ben-eb/postcss-discard-font-face.git"},"dependencies":{"balanced-match":"^0.2.0","postcss":"^4.1.11"},"gitHead":"dda6eb16a2cb429e3dd3f9096e8736794e32f99a","bugs":{"url":"https://github.com/ben-eb/postcss-discard-font-face/issues"},"_id":"postcss-discard-font-face@2.0.0","_shasum":"acf38335252752a99bb12b2b4659e37319ecad0e","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"beneb","email":"therealbenbriggs@hotmail.com"},"maintainers":[{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"trysound","email":"trysound@yandex.ru"}],"dist":{"shasum":"acf38335252752a99bb12b2b4659e37319ecad0e","size":3113,"noattachment":false,"key":"/postcss-discard-font-face/-/postcss-discard-font-face-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-discard-font-face/download/postcss-discard-font-face-2.0.0.tgz"},"directories":{},"publish_time":1434124867484,"_cnpm_publish_time":1434124867484,"_hasShrinkwrap":false},"1.0.1":{"name":"postcss-discard-font-face","version":"1.0.1","description":"Discard unused font faces with PostCSS.","main":"index.js","scripts":{"lint":"jshint index.js --reporter node_modules/jshint-stylish/stylish.js","test":"tape test.js | tap-spec"},"keywords":["css","font","optimise","optimisation","postcss","postcss-plugins","unused"],"license":"MIT","devDependencies":{"jshint":"^2.6.3","jshint-stylish":"^1.0.1","tap-spec":"^2.2.2","tape":"^3.5.0"},"homepage":"https://github.com/ben-eb/postcss-discard-font-face","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"repository":{"type":"git","url":"git://github.com/ben-eb/postcss-discard-font-face.git"},"dependencies":{"flatten":"0.0.1","uniqs":"^2.0.0","postcss":"^4.1.2"},"gitHead":"49e873bf1d36fd0e39acff6f3dc9a326b997eacf","bugs":{"url":"https://github.com/ben-eb/postcss-discard-font-face/issues"},"_id":"postcss-discard-font-face@1.0.1","_shasum":"e58142d009f92c2979f59a7b0019c281c220b393","_from":".","_npmVersion":"2.1.11","_nodeVersion":"0.10.33","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"maintainers":[{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"trysound","email":"trysound@yandex.ru"}],"dist":{"shasum":"e58142d009f92c2979f59a7b0019c281c220b393","size":2825,"noattachment":false,"key":"/postcss-discard-font-face/-/postcss-discard-font-face-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-discard-font-face/download/postcss-discard-font-face-1.0.1.tgz"},"directories":{},"publish_time":1427989268018,"_cnpm_publish_time":1427989268018,"_hasShrinkwrap":false},"1.0.0":{"name":"postcss-discard-font-face","version":"1.0.0","description":"Discard unused font faces with PostCSS.","main":"index.js","scripts":{"lint":"jshint index.js --reporter node_modules/jshint-stylish/stylish.js","test":"tape test.js | tap-spec"},"keywords":["css","font","optimise","optimisation","postcss","postcss-plugins","unused"],"license":"MIT","devDependencies":{"jshint":"^2.6.3","jshint-stylish":"^1.0.1","tap-spec":"^2.2.2","tape":"^3.5.0"},"homepage":"https://github.com/ben-eb/postcss-discard-font-face","author":{"name":"Ben Briggs","email":"beneb.info@gmail.com","url":"http://beneb.info"},"repository":{"type":"git","url":"git://github.com/ben-eb/postcss-discard-font-face.git"},"dependencies":{"flatten":"0.0.1","uniqs":"^2.0.0","postcss":"^4.1.2"},"gitHead":"97d3d9bffbad2166e0bc1e6ed6ea4eb812efccb4","bugs":{"url":"https://github.com/ben-eb/postcss-discard-font-face/issues"},"_id":"postcss-discard-font-face@1.0.0","_shasum":"17a7bb2127a472a5ca5667200c0f7e4dec1ca4da","_from":".","_npmVersion":"2.1.11","_nodeVersion":"0.10.33","_npmUser":{"name":"beneb","email":"beneb.info@gmail.com"},"maintainers":[{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"trysound","email":"trysound@yandex.ru"}],"dist":{"shasum":"17a7bb2127a472a5ca5667200c0f7e4dec1ca4da","size":2799,"noattachment":false,"key":"/postcss-discard-font-face/-/postcss-discard-font-face-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-discard-font-face/download/postcss-discard-font-face-1.0.0.tgz"},"directories":{},"publish_time":1427989088584,"_cnpm_publish_time":1427989088584,"_hasShrinkwrap":false}},"readme":"# [postcss][postcss]-discard-font-face [![Build Status](https://travis-ci.org/ben-eb/postcss-discard-font-face.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-discard-font-face.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-discard-font-face.svg)][deps]\n\n> Discard font faces by type, with PostCSS.\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-discard-font-face) do:\n\n```\nnpm install postcss-discard-font-face --save\n```\n\n## Example\n\nWhen discarding TTF fonts:\n\n### Input\n\n```css\n@font-face {\n    src: url(\"webfont.ttf\") format(\"truetype\"),\n         url(\"webfont.svg#svgFontName\") format(\"svg\");\n}\n```\n\n### Output\n\n```css\n@font-face {\n    src: url(\"webfont.svg#svgFontName\") format(\"svg\");\n}\n```\n\n## API\n\n### discardFonts([filter|options])\n\n#### filter\n\nType: `function|array`\nReturn: `boolean|string`\nArguments: The function is passed the URL of the font as the first argument,\nand the format as the second.\n\nFor each font, return false to remove, or a new string if you would like to\ntransform the URL.\n\n```js\n// Remove fonts of an unknown type\n\ndiscardFonts(function (url, format) {\n    if (~url.indexOf('.exe')) {\n        return false;\n    }\n});\n```\n\nAlternately, you can whitelist an array of types:\n\n```js\ndiscardFonts(['ttf', 'svg']);\n```\n\nWith this setting, all extensions that do not match will be removed.\n\n#### options\n\n##### font\n\nType: `object`\n\nEach key in this object should correspond to a font name, which will then be\ndiscarded if its properties do not correspond to the whitelisted properties.\nFor example, to only allow a font weight of `400` & a font style of `normal`,\nit would be configured like so:\n\n```js\ndiscardFonts({\n    font: {\n        'Open Sans': {\n            weight: [400],\n            style: ['normal']\n        }\n    }\n});\n```\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Contributing\n\nPull requests are welcome. If you add functionality, then please add unit tests\nto cover it.\n\n## License\n\nMIT © Ben Briggs\n\n[ci]:      https://travis-ci.org/ben-eb/postcss-discard-font-face\n[deps]:    https://gemnasium.com/ben-eb/postcss-discard-font-face\n[npm]:     http://badge.fury.io/js/postcss-discard-font-face\n[postcss]: https://github.com/postcss/postcss\n","_attachments":{},"homepage":"https://github.com/ben-eb/postcss-discard-font-face","bugs":{"url":"https://github.com/ben-eb/postcss-discard-font-face/issues"},"license":"MIT"}