UNPKG

motion

Version:

motion - moving development forward

76 lines (75 loc) 4.34 kB
{ "_args": [ [ "postcss-minify-font-values@https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.2.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "postcss-minify-font-values@>=1.0.2 <2.0.0", "_id": "postcss-minify-font-values@1.0.2", "_inCache": true, "_location": "/postcss-minify-font-values", "_phantomChildren": {}, "_requested": { "name": "postcss-minify-font-values", "raw": "postcss-minify-font-values@https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.2.tgz", "rawSpec": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.2.tgz", "scope": null, "spec": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.2.tgz", "type": "remote" }, "_requiredBy": [ "/cssnano" ], "_resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.2.tgz", "_shasum": "9f6a045ff4160a16da60617dd3fc32abdbee7d8b", "_shrinkwrap": null, "_spec": "postcss-minify-font-values@https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.2.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "email": "trysound@yandex.ru", "name": "Bogdan Chadkin" }, "bugs": { "url": "https://github.com/TrySound/postcss-minify-font-values/issues" }, "dependencies": { "object-assign": "^4.0.1", "postcss": "^5.0.4", "postcss-value-parser": "^3.0.2", "uniqs": "^2.0.0" }, "description": "Minify font declarations with PostCSS", "devDependencies": { "eslint": "^1.3.1", "tap-spec": "^4.1.0", "tape": "^4.2.0" }, "files": [ "index.js", "lib" ], "homepage": "https://github.com/TrySound/postcss-minify-font-values", "keywords": [ "css", "font", "font-family", "font-weight", "optimise", "postcss-plugin" ], "license": "MIT", "main": "index.js", "name": "postcss-minify-font-values", "optionalDependencies": {}, "readme": "# postcss-minify-font-values [![Build Status][ci-img]][ci]\r\n\r\n> Minify font declarations with PostCSS.\r\n\r\nThis module will try to minimise the `font-family`, `font-weight` and `font` shorthand\r\nproperties; it can unquote font families where necessary, detect & remove\r\nduplicates, and cut short a declaration after it finds a keyword. For more\r\nexamples, see the [tests](test).\r\n\r\n```css\r\nh1 {\r\n font:bold 2.2rem/.9 \"Open Sans Condensed\", sans-serif;\r\n}\r\n\r\np {\r\n font-family: \"Helvetica Neue\", Arial, sans-serif, Helvetica;\r\n font-weight: normal;\r\n}\r\n```\r\n\r\n```css\r\nh1 {\r\n font:700 2.2rem/.9 Open Sans Condensed,sans-serif\r\n}\r\n\r\np {\r\n font-family: Helvetica Neue,Arial,sans-serif;\r\n font-weight: 400;\r\n}\r\n```\r\n\r\n## API\r\n\r\n### minifyFontValues([options])\r\n\r\n#### options\r\n\r\n##### removeAfterKeyword\r\n\r\nType: `boolean`\r\nDefault: `true`\r\n\r\nPass `false` to disable the module from removing font families after it\r\nencounters a font keyword, for example `sans-serif`.\r\n\r\n##### removeDuplicates\r\n\r\nType: `boolean`\r\nDefault: `true`\r\n\r\nPass `false` to disable the module from removing duplicated font families.\r\n\r\n##### removeQuotes\r\n\r\nType: `boolean`\r\nDefault: `true`\r\n\r\nPass `false` to disable the module from removing quotes from font families.\r\nNote that oftentimes, this is a *safe optimisation* & is done safely. For more\r\ndetails, see [Mathias Bynens' article][mathias].\r\n\r\n## Usage\r\n\r\n```js\r\npostcss([ require('postcss-minify-font-values') ])\r\n```\r\n\r\nSee [PostCSS] docs for examples for your environment.\r\n\r\nMIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)\r\n\r\n[mathias]: https://mathiasbynens.be/notes/unquoted-font-family\r\n[PostCSS]: https://github.com/postcss/postcss\r\n[ci-img]: https://travis-ci.org/TrySound/postcss-minify-font-values.svg\r\n[ci]: https://travis-ci.org/TrySound/postcss-minify-font-values\r\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/TrySound/postcss-minify-font-values.git" }, "scripts": { "test": "eslint index.js lib test && tape test/*.js | tap-spec" }, "version": "1.0.2" }