{"_id":"postcss-plugin-px2rem","_rev":"9-46e89809c899433c49b0e7cd80261e82","name":"postcss-plugin-px2rem","description":"A plugin for PostCSS that generates rem units from multi units.","dist-tags":{"latest":"0.8.1"},"versions":{"0.5.0":{"name":"postcss-plugin-px2rem","version":"0.5.0","description":"postcss plugin px2rem","main":"index.js","scripts":{"compile":"rm -rf lib && babel -d lib src","compile:watch":"npm run compile -- --watch","lint":"eslint src test","test":"babel-node $(npm bin)/babel-istanbul cover $(npm bin)/_mocha -- --no-timeouts","coveralls":"cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/ant-tool/postcss-plugin-px2rem.git"},"keywords":["px","rem","postcss","plugin"],"author":{"name":"pigcan","email":"jiangjay818@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ant-tool/postcss-plugin-px2rem/issues"},"homepage":"https://github.com/ant-tool/postcss-plugin-px2rem#readme","dependencies":{"postcss":"^5.0.21"},"devDependencies":{"babel-cli":"^6.7.5","babel-core":"^6.7.6","babel-eslint":"^6.0.2","babel-istanbul":"^0.7.0","babel-plugin-add-module-exports":"^0.1.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.5.0","coveralls":"^2.11.9","eslint":"^2.7.0","eslint-config-airbnb":"^6.2.0","expect":"^1.20.1","mocha":"^2.4.5"},"files":["lib","index.js","package.json","README.md"],"gitHead":"dc8679bbb396de8425030ddb4d6f53d2419bceb4","_id":"postcss-plugin-px2rem@0.5.0","_shasum":"84c4287faddd7106576b5e56bdd8efce0b4c05d4","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"pigcan","email":"jiangjay818@gmail.com"},"dist":{"shasum":"84c4287faddd7106576b5e56bdd8efce0b4c05d4","tarball":"https://registry.npmjs.org/postcss-plugin-px2rem/-/postcss-plugin-px2rem-0.5.0.tgz","integrity":"sha512-wOlXz0SbMQWyXhcCKwTED5XMtzZVe5eK3eTTQbkQYbF6lgVLq6Y3RfP26JMnAqH8DPaaELs+/Mpv42lD3or9gw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr6CcX9F0JgvOLo9ryQs+naBOO0eGs3WyK7w5URiSmWAIhAJ7K5gbbeW8ccuLKAgqdx+rZYCCGqhfz3BKX7TCXuo58"}]},"maintainers":[{"name":"pigcan","email":"jiangjay818@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/postcss-plugin-px2rem-0.5.0.tgz_1466662169080_0.6456436822190881"},"directories":{}},"0.6.0":{"name":"postcss-plugin-px2rem","version":"0.6.0","description":"postcss plugin px2rem","main":"index.js","scripts":{"compile":"rm -rf lib && babel -d lib src","compile:watch":"npm run compile -- --watch","lint":"eslint src test","test":"babel-node $(npm bin)/babel-istanbul cover $(npm bin)/_mocha -- --no-timeouts","coveralls":"cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/ant-tool/postcss-plugin-px2rem.git"},"keywords":["px","rem","postcss","plugin"],"author":{"name":"pigcan","email":"jiangjay818@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ant-tool/postcss-plugin-px2rem/issues"},"homepage":"https://github.com/ant-tool/postcss-plugin-px2rem#readme","dependencies":{"postcss":"^5.0.21"},"devDependencies":{"babel-cli":"^6.7.5","babel-core":"^6.7.6","babel-eslint":"^6.0.2","babel-istanbul":"^0.7.0","babel-plugin-add-module-exports":"^0.1.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.5.0","coveralls":"^2.11.9","eslint":"^2.7.0","eslint-config-airbnb":"^6.2.0","expect":"^1.20.1","mocha":"^2.4.5"},"files":["lib","index.js","package.json","README.md"],"gitHead":"563b99d110051ef24a45bb1c683fadeae2bc83f6","_id":"postcss-plugin-px2rem@0.6.0","_shasum":"1e532c03774e26de2760baedbc40f8b76faca313","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"pigcan","email":"jiangjay818@gmail.com"},"dist":{"shasum":"1e532c03774e26de2760baedbc40f8b76faca313","tarball":"https://registry.npmjs.org/postcss-plugin-px2rem/-/postcss-plugin-px2rem-0.6.0.tgz","integrity":"sha512-Jr0PbhJPaebMaguos5WLv/cvQsmj9MN3NhaKcDgtiq/GJ0tqCl1XbPZCUdfC44VO1lzHXclqUgVcMVQM5gh8jQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBYFg9xmLoR0MSVsGQrJdSHHWBMWoJQ5qIVd2EdDQj0jAiEAyM0nOAKDCohFW+cST786nWMbSqxePsmd6l46L4XQwMo="}]},"maintainers":[{"name":"pigcan","email":"jiangjay818@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/postcss-plugin-px2rem-0.6.0.tgz_1466664417764_0.1373584612738341"},"directories":{}},"0.7.0":{"name":"postcss-plugin-px2rem","version":"0.7.0","description":"A plugin for PostCSS that generates rem units from multi units.","main":"index.js","scripts":{"compile":"rm -rf lib && babel -d lib src","compile:watch":"npm run compile -- --watch","lint":"eslint src test","test":"babel-node $(npm bin)/babel-istanbul cover $(npm bin)/_mocha -- --no-timeouts","coveralls":"cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/ant-tool/postcss-plugin-px2rem.git"},"keywords":["px","rem","postcss","plugin"],"author":{"name":"pigcan","email":"jiangjay818@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ant-tool/postcss-plugin-px2rem/issues"},"homepage":"https://github.com/ant-tool/postcss-plugin-px2rem#readme","dependencies":{"postcss":"^5.0.21"},"devDependencies":{"babel-cli":"^6.7.5","babel-core":"^6.7.6","babel-eslint":"^6.0.2","babel-istanbul":"^0.7.0","babel-plugin-add-module-exports":"^0.1.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.5.0","coveralls":"^2.11.9","eslint":"^2.7.0","eslint-config-airbnb":"^6.2.0","expect":"^1.20.1","mocha":"^2.4.5"},"files":["lib","index.js","package.json","README.md"],"gitHead":"4b9d903290e234919b5557ea25dd29788739a8b9","_id":"postcss-plugin-px2rem@0.7.0","_shasum":"5178cf64d2dc62e98d48d1ccfd053ee4a00e2545","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"pigcan","email":"jiangjay818@gmail.com"},"dist":{"shasum":"5178cf64d2dc62e98d48d1ccfd053ee4a00e2545","tarball":"https://registry.npmjs.org/postcss-plugin-px2rem/-/postcss-plugin-px2rem-0.7.0.tgz","integrity":"sha512-MDrXLnIhS1wTzZh6OYwYoHgRaa6025oAdiggtzbVz2iCuZrnP6czEscAEgDl2RDQelRgRWe5d3oW9k++nwe+Mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvyltbCXQSKyn1M9ZENcUS5uAknBDcBlOs6qWH9rmSMAIhAJT1ySZTGnsthsdvTJtrvBxyn3fmWS90Eu0ZaF6sv+49"}]},"maintainers":[{"name":"pigcan","email":"jiangjay818@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/postcss-plugin-px2rem-0.7.0.tgz_1487130988513_0.9290542693343014"},"directories":{}},"0.8.0":{"name":"postcss-plugin-px2rem","version":"0.8.0","description":"A plugin for PostCSS that generates rem units from multi units.","main":"index.js","scripts":{"compile":"rm -rf lib && babel -d lib src","compile:watch":"npm run compile -- --watch","lint":"eslint src test","test":"babel-node $(npm bin)/babel-istanbul cover $(npm bin)/_mocha -- --no-timeouts","coveralls":"cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/ant-tool/postcss-plugin-px2rem.git"},"keywords":["px","rem","postcss","plugin"],"author":{"name":"pigcan","email":"jiangjay818@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ant-tool/postcss-plugin-px2rem/issues"},"homepage":"https://github.com/ant-tool/postcss-plugin-px2rem#readme","dependencies":{"postcss":"^5.0.21"},"devDependencies":{"babel-cli":"^6.7.5","babel-core":"^6.7.6","babel-eslint":"^6.0.2","babel-istanbul":"^0.7.0","babel-plugin-add-module-exports":"^0.1.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.5.0","coveralls":"^2.11.9","eslint":"^2.7.0","eslint-config-airbnb":"^6.2.0","expect":"^1.20.1","mocha":"^2.4.5"},"gitHead":"4d8d288a78ef78275f91f57fc56e0ad13bc7708c","_id":"postcss-plugin-px2rem@0.8.0","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"pigcan","email":"jiangjay818@gmail.com"},"dist":{"integrity":"sha512-/InLV+lzIpyFHEtJAHAm0wR9Ub9xnIMIMJ3aZBwm0FOEY5fWs77l8ebslHIN5cAKucuu6erc1sI2ytUg054qow==","shasum":"baee3e9108ad5223fa6a7df8e2173c738b428661","tarball":"https://registry.npmjs.org/postcss-plugin-px2rem/-/postcss-plugin-px2rem-0.8.0.tgz","fileCount":5,"unpackedSize":11093,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9rnMCRA9TVsSAnZWagAAWmEQAIhDoprXS14UMz1dg6RE\nnFtpVUYQhnNF0HeRCB+M2YPI11ZQOu5cHRKT2z7Y0XZOIkWhy+6x/HQMwcB4\nZoOF06nsnmk2BY4in5lUCbl8pbCydgF+F41LsghTxng+9W6vBbXDI/sqhsyy\n3enwTMtdaqqkJzLcmdN/He/Jfhipv6Z1PZ7Uv2y0W9ZbdOfys0t/WDfBjl+I\ninCcICF030Tn+FpISzQVJoeBoeqTrMzvJLWlqhdIBVpG092NZPgbP+GxuLIm\n+SFTK9Bhz25L9RZU4uSLsaqW42uAWZPwcL/UTxahzleHysePWCrYuqyu9tNw\nPnYIMPbmB6sQfK3UDTvQQc9TndxDw6Ug0+/351atgFht+NM3re81N6m8lmBh\n6hgba6HFMAn4glMgSfcoP7zA1OdfX8/fMOsNmi2/KJ961uyIjX0lATMuJHtY\nySY27jcLA1p76KtZ03Ropgnya8zhIurTMSGPtO5Rb5vbzK3IrRqh6jVRhnNK\nUg+9HrUrgNUb171M++LgAl9Cfw+SgwuejtG/1AJ9XLifWod3TTxKJup3539N\nixgGs9E1oJJ/Uzhx4QfgG+Xbo16S4r4TaYmkwvnSbURlWo4s13lXCz8NFw9b\nAUtTGJR24SHoJZa42JTxg2kPbLM0UNyRTxXJ+hCprkgSi8Tzh7Nb9yojzSfx\n3eUS\r\n=Lt6Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGaZ3aTCZD9v1fMbPCI1JdcgTo11NczkBCQiMu7Zbz0BAiBQ3/vSy5K17ud9qRRN9d91HVE97fPEqZ8lWDMgybCKFg=="}]},"maintainers":[{"name":"pigcan","email":"jiangjay818@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-plugin-px2rem_0.8.0_1542896075511_0.0021150325349361676"},"_hasShrinkwrap":false},"0.8.1":{"name":"postcss-plugin-px2rem","version":"0.8.1","description":"A plugin for PostCSS that generates rem units from multi units.","main":"index.js","scripts":{"compile":"rm -rf lib && babel -d lib src","compile:watch":"npm run compile -- --watch","lint":"eslint src test","prepublish":"npm run compile","test":"babel-node $(npm bin)/babel-istanbul cover $(npm bin)/_mocha -- --no-timeouts","coveralls":"cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+https://github.com/ant-tool/postcss-plugin-px2rem.git"},"keywords":["px","rem","postcss","plugin"],"author":{"name":"pigcan","email":"jiangjay818@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ant-tool/postcss-plugin-px2rem/issues"},"homepage":"https://github.com/ant-tool/postcss-plugin-px2rem#readme","dependencies":{"postcss":"^5.0.21"},"devDependencies":{"babel-cli":"^6.7.5","babel-core":"^6.7.6","babel-eslint":"^6.0.2","babel-istanbul":"^0.7.0","babel-plugin-add-module-exports":"^0.1.2","babel-preset-es2015":"^6.6.0","babel-preset-stage-0":"^6.5.0","coveralls":"^2.11.9","eslint":"^2.7.0","eslint-config-airbnb":"^6.2.0","expect":"^1.20.1","mocha":"^2.4.5"},"gitHead":"e60b2ca3a8fc34ff0f460f4c336e63a6faede4db","_id":"postcss-plugin-px2rem@0.8.1","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"pigcan","email":"jiangjay818@gmail.com"},"dist":{"integrity":"sha512-gNxhrnR57pnGrPLLqVNWY9+BWgj46kYkphw+0gpRJf9tjgwI7/tLqQPK7KdlksB2SSAddOb11otDVwri8b8mXw==","shasum":"e8adf28fd2befbc079a119126b5c62a88905d5e1","tarball":"https://registry.npmjs.org/postcss-plugin-px2rem/-/postcss-plugin-px2rem-0.8.1.tgz","fileCount":5,"unpackedSize":11268,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCIspCRA9TVsSAnZWagAAClkQAIFHpWcM6m7x42dsusIa\nWMXXoCYiBudjkPp7O8NiGjPsTnDm68N0RyNLujJWA49aNi8CShCo7snk2HMF\n7iXHcleQvYHvvgAfNfuzQ57Fo0eG181zchqEBP5k0mgeRGfDyW8Yv0podgNZ\n82IRecDvHSoddCiMwa/zHId31EISDVdDzFERFUX5C0yL3lkuC/2X4emcbbIm\n5G/dsPmM+7aN8R1mdpeBeq0Ev8poPpEBPYKjQwO8V2XHfxHbIGVjJypOsA+N\n+w9TeK4kGv/uo/HU+BF00Q9WHZK8ArauaegSvNDlHmiHvG2h5Tys8XKLHsb8\n4QT22ojzejYKfFRkrYAkesGy+bHxCYlTJq8j7pN6zVy1xVQ4V/X5lwKoHTrS\n+Ix7kVMIUORVRbG50jigbxPfTFZiq5C7ufhvQVN+DyII9nAi7w1yt+y4NHxG\nqETLsyjbkg591xDQPC6PPGgx4ZTPhM9v3AOFQm//MIx4QSg9cgWyFc7IVQVO\nPd5ZHpBuTGImyxAxLEm5pVRYWK3VNjBHAQSNSx/uf0Wu9TyzvKpIKrwvCAlK\nXvSuJYULb8MZFR3YXv7HQCpZOtGzizBER+z4yK927pCwf5Vnwcp7UA0tQL+k\nKZMPMgzJvPF68MbS1UsQACB7JQs7SNj/8jOC4bIKM8IK+fJpqUU0LRvviPAF\nPcRJ\r\n=Smku\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6oPLmOsNqTe0rE7gOlePiS5AU1XWJMQz07tsnc5MRKQIgEYWP+9bvh++WRPxijq1JBPEpitdQMpzv+K9FmVe/jcE="}]},"maintainers":[{"name":"pigcan","email":"jiangjay818@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-plugin-px2rem_0.8.1_1544063784758_0.22761186582895254"},"_hasShrinkwrap":false}},"readme":"# postcss-plugin-px2rem\n\n[![NPM version](https://img.shields.io/npm/v/postcss-plugin-px2rem.svg?style=flat)](https://npmjs.org/package/postcss-plugin-px2rem)\n[![Build Status](https://img.shields.io/travis/ant-tool/postcss-plugin-px2rem.svg?style=flat)](https://travis-ci.org/ant-tool/postcss-plugin-px2rem)\n[![Coverage Status](https://img.shields.io/coveralls/ant-tool/postcss-plugin-px2rem.svg?style=flat)](https://coveralls.io/r/ant-tool/postcss-plugin-px2rem)\n[![NPM downloads](http://img.shields.io/npm/dm/postcss-plugin-px2rem.svg?style=flat)](https://npmjs.org/package/postcss-plugin-px2rem)\n[![Dependency Status](https://david-dm.org/ant-tool/postcss-plugin-px2rem.svg)](https://david-dm.org/ant-tool/postcss-plugin-px2rem)\n\npostcss plugin px2rem.\n\n<img align=\"right\" width=\"135\" height=\"95\"\n     title=\"Philosopher’s stone, logo of PostCSS\"\n     src=\"http://postcss.github.io/postcss/logo-leftp.svg\">\n\n## Features\n\nA plugin for PostCSS that generates rem units from pixel units.\n\n## Installation\n\n```bash\n$ npm i --save postcss-plugin-px2rem\n```\n\n## Usage\n\n### input and output\n\n```css\n// input\nh1 {\n  margin: 0 0 20px;\n  font-size: 32px;\n  line-height: 1.2;\n  letter-spacing: 1px;\n}\n\n// output\nh1 {\n  margin: 0 0 0.2rem;\n  font-size: 0.32rem;\n  line-height: 1.2;\n  letter-spacing: 0.01rem;\n}\n```\n\n### original\n\n```javascript\nimport { writeFile, readFileSync } from 'fs';\nimport postcss from 'postcss';\nimport pxtorem from 'postcss-plugin-px2rem';\n\nconst css = readFileSync('/path/to/test.css', 'utf8');\nconst options = {\n  replace: false,\n};\nconst processedCss = postcss(pxtorem(options)).process(css).css;\n\nwriteFile('/path/to/test.rem.css', processedCss, err => {\n  if (err) throw err;\n  console.log('Rem file written.');\n});\n```\n\n### with webpack\n\n```javascript\nimport px2rem from 'postcss-plugin-px2rem';\nconst px2remOpts = {\n  ......\n};\n \nexport default {\n  module: {\n    loaders: [\n      {\n        test: /\\.css$/,\n        loader: 'style-loader!css-loader!postcss-loader',\n      },\n    ],\n  },\n  postcss: [px2rem(px2remOpts)],\n}\n```\n\n### with [atool-build](https://github.com/ant-tool/atool-build)\n\n`webpack.connfig.js`\n\n```javascript\nimport webpack from 'atool-build/lib/webpack';\nimport px2rem from 'postcss-plugin-px2rem';\n\nexport default webpackConfig => {\n  const px2remOpts = {\n    ......\n  };\n  webpackConfig.postcss.push(px2rem(px2remOpts));\n\n  return webpackConfig;\n};\n```\n\n## Configuration\n\nDefault:\n```js\n{\n  rootValue: 100,\n  unitPrecision: 5,\n  propWhiteList: [],\n  propBlackList: [],\n  exclude:false,\n  selectorBlackList: [],\n  ignoreIdentifier: false,\n  replace: true,\n  mediaQuery: false,\n  minPixelValue: 0\n}\n```\n\n- `rootValue` (Number|Object) The root element font size. Default is 100.\n    - If rootValue is an object, for example `{ px: 50, rpx: 100 }`, it will\n    replace rpx to 1/100 rem , and px to 1/50 rem.\n- `unitPrecision` (Number) The decimal numbers to allow the REM units to grow to.\n- `propWhiteList` (Array) The properties that can change from px to rem.\n    - Default is an empty array that means disable the white list and enable all properties.\n    - Values need to be exact matches.\n- `propBlackList` (Array) The properties that should not change from px to rem.\n    - Values need to be exact matches.\n- `exclude` (Reg)  a way to exclude some folder,eg. /(node_module)/.\n- `selectorBlackList` (Array) The selectors to ignore and leave as px.\n    - If value is string, it checks to see if selector contains the string.\n        - `['body']` will match `.body-class`\n    - If value is regexp, it checks to see if the selector matches the regexp.\n        - `[/^body$/]` will match `body` but not `.body`\n- `ignoreIdentifier` (Boolean/String)  a way to have a single property ignored, when ignoreIdentifier enabled, then `replace` would be set to `true` automatically.\n- `replace` (Boolean) replaces rules containing rems instead of adding fallbacks.\n- `mediaQuery` (Boolean) Allow px to be converted in media queries.\n- `minPixelValue` (Number) Set the minimum pixel value to replace.\n\n### License\nMIT\n","maintainers":[{"name":"pigcan","email":"jiangjay818@gmail.com"}],"time":{"modified":"2022-06-24T10:35:54.696Z","created":"2016-06-23T06:09:31.101Z","0.5.0":"2016-06-23T06:09:31.101Z","0.6.0":"2016-06-23T06:46:59.711Z","0.7.0":"2017-02-15T03:56:30.437Z","0.8.0":"2018-11-22T14:14:35.624Z","0.8.1":"2018-12-06T02:36:24.902Z"},"homepage":"https://github.com/ant-tool/postcss-plugin-px2rem#readme","keywords":["px","rem","postcss","plugin"],"repository":{"type":"git","url":"git+https://github.com/ant-tool/postcss-plugin-px2rem.git"},"author":{"name":"pigcan","email":"jiangjay818@gmail.com"},"bugs":{"url":"https://github.com/ant-tool/postcss-plugin-px2rem/issues"},"license":"MIT","readmeFilename":"README.md","users":{"bonashen":true}}