{"_id":"@benjamin-vanryseghem/rollup-plugin-postcss","_rev":"2-20712484bfc7b8be6547e3ae75ff1c8e","name":"@benjamin-vanryseghem/rollup-plugin-postcss","dist-tags":{"latest":"1.6.3"},"versions":{"1.6.2":{"name":"@benjamin-vanryseghem/rollup-plugin-postcss","version":"1.6.2","description":"Seamless integration between Rollup and PostCSS","main":"dist/rollup-plugin-postcss.cjs.js","scripts":{"test":"npm run lint && jest","test:cov":"npm run lint && jest --coverage","build":"bili --target node --no-babel.babelrc","lint":"xo","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/egoist/rollup-plugin-postcss.git"},"keywords":["postcss","rollup"],"author":{"name":"EGOIST","email":"0x142857@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/egoist/rollup-plugin-postcss/issues"},"homepage":"https://github.com/egoist/rollup-plugin-postcss#readme","devDependencies":{"autoprefixer":"^7.2.4","babel-jest":"^22.0.4","babel-preset-env":"^1.5.1","bili":"^3.0.1","eslint-config-rem":"^4.0.0","jest":"^22.0.4","less":"^2.7.3","node-sass":"^4.7.2","rollup":"^0.57.1","stylus":"^0.54.5","sugarss":"^1.0.1","xo":"^0.18.2"},"dependencies":{"@vue/component-compiler-utils":"^1.0.0","chalk":"^2.0.0","concat-with-sourcemaps":"^1.0.5","cssnano":"^3.10.0","fs-extra":"^5.0.0","import-cwd":"^2.1.0","p-queue":"^2.4.2","pify":"^3.0.0","postcss":"^6.0.21","postcss-load-config":"^1.2.0","postcss-modules":"^1.1.0","promise.series":"^0.2.0","reserved-words":"^0.1.2","resolve":"^1.5.0","rollup-pluginutils":"^2.0.1","style-inject":"^0.3.0"},"xo":{"extends":"rem","envs":["jest"],"rules":{"import/prefer-default-export":0}},"babel":{"presets":[["env",{"targets":{"node":"current"}}]]},"gitHead":"5397605439ca94066751380238d61ede2b3604c2","_id":"@benjamin-vanryseghem/rollup-plugin-postcss@1.6.2","_npmVersion":"6.1.0","_nodeVersion":"10.6.0","_npmUser":{"name":"benjamin-vanryseghem","email":"benjamin.vanryseghem@gmail.com"},"dist":{"integrity":"sha512-CEOvAIgel2kdfY7OnZVUWk0GqvprgN59Zus0sadCgWaNMAUD/Gla0+aCSgXLwb21SKaMu+OEb3nXRR40ngWNgg==","shasum":"37bfd7030525b123db33d587f9d444bec593df61","tarball":"https://registry.npmjs.org/@benjamin-vanryseghem/rollup-plugin-postcss/-/rollup-plugin-postcss-1.6.2.tgz","fileCount":7,"unpackedSize":82688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxLhfCRA9TVsSAnZWagAAAoYP/2JMFZjKkgDOmJXilb/3\nO/2TgcIBtICVgt+14qy2rR/4a36LP5moRIHmP00hjZaqRDMnzxKdkt1ClHEk\nqc3GN1QtHX9++q1Q6Hbm9m+TDZRYWhaT3GuIdNyE+NVBIQdhLWjd2VRlFcgg\nmMZKnwCkr7iZZNoFf8e0Xjh88YLT/8p3myTvrU5nZdAdSRBS2VJve4SImKXD\nQgteozO2rO8Lc4rXF90spbfbR+8/9nVL4128xazW9PAqKTTo5DkWpwvLfedZ\na6AVYwBgqx+IMhQBkY3izRq16ogOX/x/+FsNoKZOFbZX38dKpSL943Va6iND\nQ1LMCK/TXydKm9XTEqlnfxC2ULqLwC6BTM8VJR2s7YctAO7V2HZPIu/ba/Ph\nW5xCLrdKeEiIj5fKniTokGrWHW3EZYYFfCPLv78F7Rb3d18UnNcWILpY+oSB\nw9/T5fUlDy7iwlJ88gC//a5QRCzTKVuUsSfe8PQt1lDPzZ0MYXXfSLrm91Fv\n4mNXqAa4JsJdFqk4drs72lNr4nd9DGqnQ73BgJS5Qicp/TZqqVlfhU2/T+nc\nD0mLsKFKtFnaDkV8EbCeBfkc+wb3giBZLmzPnYMU7F/C3/sE3Y8xFFAmh4GD\nP7GWTpwrxTr+kia9LOJndanLvu6f6zWj4UC7BTIHDh8sZDmFXieIBU512icS\nIn72\r\n=wm8u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqVyZXmMBxV6EfjyyuNUxLUzpWUo3qAMlv4Q2kKH7G8wIgfd+UxCmevFakIwOo5Rv4PFwf9cwBHJeCIJv+6Zac2+Y="}]},"maintainers":[{"name":"benjamin-vanryseghem","email":"benjamin.vanryseghem@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-postcss_1.6.2_1539618911009_0.15024615855409196"},"_hasShrinkwrap":false},"1.6.3":{"name":"@benjamin-vanryseghem/rollup-plugin-postcss","version":"1.6.3","description":"Seamless integration between Rollup and PostCSS","main":"dist/@benjamin-vanryseghem/rollup-plugin-postcss.cjs.js","scripts":{"test":"npm run lint && jest","test:cov":"npm run lint && jest --coverage","build":"bili --target node --no-babel.babelrc","lint":"xo","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/egoist/rollup-plugin-postcss.git"},"keywords":["postcss","rollup"],"author":{"name":"EGOIST","email":"0x142857@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/egoist/rollup-plugin-postcss/issues"},"homepage":"https://github.com/egoist/rollup-plugin-postcss#readme","devDependencies":{"autoprefixer":"^7.2.4","babel-jest":"^22.0.4","babel-preset-env":"^1.5.1","bili":"^3.0.1","eslint-config-rem":"^4.0.0","jest":"^22.0.4","less":"^2.7.3","node-sass":"^4.7.2","rollup":"^0.57.1","stylus":"^0.54.5","sugarss":"^1.0.1","xo":"^0.18.2"},"dependencies":{"@vue/component-compiler-utils":"^1.0.0","chalk":"^2.0.0","concat-with-sourcemaps":"^1.0.5","cssnano":"^3.10.0","fs-extra":"^5.0.0","import-cwd":"^2.1.0","p-queue":"^2.4.2","pify":"^3.0.0","postcss":"^6.0.21","postcss-load-config":"^1.2.0","postcss-modules":"^1.1.0","promise.series":"^0.2.0","reserved-words":"^0.1.2","resolve":"^1.5.0","rollup-pluginutils":"^2.0.1","style-inject":"^0.3.0"},"xo":{"extends":"rem","envs":["jest"],"rules":{"import/prefer-default-export":0}},"babel":{"presets":[["env",{"targets":{"node":"current"}}]]},"gitHead":"5397605439ca94066751380238d61ede2b3604c2","_id":"@benjamin-vanryseghem/rollup-plugin-postcss@1.6.3","_npmVersion":"6.1.0","_nodeVersion":"10.6.0","_npmUser":{"name":"benjamin-vanryseghem","email":"benjamin.vanryseghem@gmail.com"},"dist":{"integrity":"sha512-flpFC/EDMpOWp8t5RfUf149IXHwLVciZJ0S8TcNKW7ScFHbjk0Y7iNMwQQbNu/LjcRDOE5XlrK6nGEHlWP2/rQ==","shasum":"14224f65491b63e019e7b6afddc7d297668770b3","tarball":"https://registry.npmjs.org/@benjamin-vanryseghem/rollup-plugin-postcss/-/rollup-plugin-postcss-1.6.3.tgz","fileCount":5,"unpackedSize":40788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxMKdCRA9TVsSAnZWagAAd6EP/25FmYH9ZO8ZmPNJ8sj8\nTjPiJGvSUdelqdjPP+8RXW8gx08d5U/RIAl0vdnGrY5N5DrO4qefSCieOzcK\nGrFaoj/0FEcWQdH4MvrNXI6x0d+ftzc935BCP2OkJbG2X1tUR6v7fA0dSy1Z\nXbvjMJsRAnoBuSoy8Q1qxXAR2YESLs7d2y32MMBl1B18/54a1v0Ncm+0sLVr\n4rW30JkMlMY7RDRfDhGP9iQOyub2uxHK1c7YIyjugmdW4Aa8CbxMMvzCsJGO\ngqXFq41JgjWKoVfaccaggOcE9XlCTjwxPdZ1pUdk9EBn69UUORNmDKUNYaPz\nDlCehGh5ZCZiOWoFLdB49j2i3u7fksWoludIZ8ErRXfyw0rOJEe/rFmWQ1vH\nrvjVoP42VG21uMsl0UxTQpUVIY6+E2FOXRMwRV2gOx2BxJiONbrkK1DNFRMe\nCRl2uctHJg8elZnJOjPqAU86NwgZa9N7NazRK5znLbGIvP56Rru4aVDSuZmE\nkICWZhsbZIZjUBLnHOKPstpJqr83ZmyYxhaISlCkHiZjp0EJNIsVf/+kos6U\n0xDxUMQ3D/c1AXTuQoXFyp8woU4ZFZ+xyachRC47AhjE8YySTsMrpadpTL/8\nhHunHczM4dYiEfPQv6MDbQjU03/KuwqLMx5+oDB6/iatX4NfT2qh9O1NSQOv\nNvnR\r\n=K8is\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWcm248AcE/tkzKVnGIqFkwmsJ2DOrpkNzFKNHDS2eUwIgFH1+HiNE/nXQDfpBrTb4jAHMx0oVV0YJAD2gGzFY+XE="}]},"maintainers":[{"name":"benjamin-vanryseghem","email":"benjamin.vanryseghem@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-postcss_1.6.3_1539621532634_0.6895886936974212"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-15T15:55:10.823Z","1.6.2":"2018-10-15T15:55:11.199Z","modified":"2022-04-04T18:22:46.071Z","1.6.3":"2018-10-15T16:38:52.764Z"},"maintainers":[{"name":"benjamin-vanryseghem","email":"benjamin.vanryseghem@gmail.com"}],"description":"Seamless integration between Rollup and PostCSS","homepage":"https://github.com/egoist/rollup-plugin-postcss#readme","keywords":["postcss","rollup"],"repository":{"type":"git","url":"git+https://github.com/egoist/rollup-plugin-postcss.git"},"author":{"name":"EGOIST","email":"0x142857@gmail.com"},"bugs":{"url":"https://github.com/egoist/rollup-plugin-postcss/issues"},"license":"MIT","readme":"# rollup-plugin-postcss\n\n[![NPM version](https://img.shields.io/npm/v/rollup-plugin-postcss.svg?style=flat)](https://npmjs.com/package/rollup-plugin-postcss) [![NPM downloads](https://img.shields.io/npm/dm/rollup-plugin-postcss.svg?style=flat)](https://npmjs.com/package/rollup-plugin-postcss) [![Build Status](https://img.shields.io/circleci/project/egoist/rollup-plugin-postcss/master.svg?style=flat)](https://circleci.com/gh/egoist/rollup-plugin-postcss) [![codecov](https://codecov.io/gh/egoist/rollup-plugin-postcss/branch/master/graph/badge.svg)](https://codecov.io/gh/egoist/rollup-plugin-postcss)\n [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate)\n\n<img align=\"right\" width=\"95\" height=\"95\"\n     title=\"Philosopher’s stone, logo of PostCSS\"\n     src=\"http://postcss.github.io/postcss/logo.svg\">\n\nSeamless integration between [Rollup](https://github.com/rollup/rollup) and [PostCSS](https://github.com/postcss/postcss).\n\n## Install\n\n```bash\nyarn add rollup-plugin-postcss --dev\n```\n\n## Usage\n\nYou are viewing the docs for `v1.0`, for `v0.5` please see [here](https://github.com/egoist/rollup-plugin-postcss/tree/0.5).\n\n```js\n// rollup.config.js\nimport postcss from 'rollup-plugin-postcss'\n\nexport default {\n  plugins: [\n    postcss({\n      plugins: []\n    })\n  ]\n}\n```\n\nThen you can use CSS files:\n\n```js\nimport './style.css'\n```\n\nNote that the generated CSS will be injected to `<head>` by default, and the CSS string is also available as default export unless `extract: true`:\n\n```js\n// Inject to `<head>` and also available as `style`\nimport style from './style.css'\n```\n\nIt will also automatically use local PostCSS config files.\n\n### Extract CSS\n\n```js\npostcss({\n  extract: true\n})\n```\n\n### CSS modules\n\n```js\npostcss({\n  modules: true,\n  // Or with custom options for `postcss-modules`\n  modules: {}\n})\n```\n\n### With Sass/Stylus/Less\n\nInstall corresponding dependency:\n\n- For `Sass` install `node-sass`: `yarn add node-sass --dev`\n- For `Stylus` Install `stylus`: `yarn add stylus --dev`\n- For `Less` Install `less`: `yarn add less --dev`\n\nThat's it, you can now import `.styl` `.scss` `.sass` `.less` files in your library.\n\n#### imports\n\n__For Sass/Scss Only.__\n\nSimilar to how webpack's [sass-loader](https://github.com/webpack-contrib/sass-loader#imports) works, you can prepend the path with `~` to tell this plugin to resolve in `node_modules`:\n\n```sass\n@import \"~bootstrap/dist/css/bootstrap\";\n```\n\n## Options\n\n### extensions\n\nType: `string[]`<br>\nDefault: `['.css', '.sss', '.pcss']`\n\nThis plugin will process files ending with these extensions and the extensions supported by [custom loaders](#loaders).\n\n### plugins\n\nType: `Array`\n\nPostCSS Plugins.\n\n### inject\n\nType: `boolean` `object`<br>\nDefault: `true`\n\nInject CSS into `<head>`, it's always `false` when `extract: true`.\n\nYou can also use it as options for [`style-inject`](https://github.com/egoist/style-inject#options).\n\n### extract\n\nType: `boolean` `string`<br>\nDefault: `false`\n\nExtract CSS to the same location where JS file is generated but with `.css` extension.\n\nYou can also set it to an absolute path.\n\n### modules\n\nType: `boolean` `object`<br>\nDefault: `false`\n\nEnable CSS modules or set options for `postcss-modules`.\n\n### autoModules\n\nType: `boolean`<br>\nDefault: `true`\n\nAutomatically enable CSS modules for `.module.css` `.module.sss` `.module.scss` `.module.sass` `.module.styl` `.module.stylus` `.module.less` files.\n\n### namedExports\n\nType: `boolean` `function`<br>\nDefault: `false`\n\nUse named exports alongside default export.\n\nYou can supply a function to control how exported named is generated:\n\n```js\nnamedExports(name) {\n  // Maybe you simply want to convert dash to underscore\n  return name.replace(/-/g, '_')\n}\n```\n\nIf you set it to `true`, the following will happen when importing specific classNames:\n\n- dashed class names will be transformed by replacing all the dashes to `$` sign wrapped underlines, eg. `--` => `$__$`\n- js protected names used as your style class names, will be transformed by wrapping the names between `$` signs, eg. `switch` => `$switch$`\n\nAll transformed names will be logged in your terminal like:\n\n```bash\nExported \"new\" as \"$new$\" in test/fixtures/named-exports/style.css\n```\n\nThe original will not be removed, it's still available on `default` export:\n\n```js\nimport style, { class$_$name, class$__$name, $switch$ } from './style.css'\nconsole.log(style['class-name'] === class$_$name) // true\nconsole.log(style['class--name'] === class$__$name) // true\nconsole.log(style['switch'] === $switch$) // true\n```\n\n### minimize\n\nType: `boolean` `object`<br>\nDefault: `false`\n\nMinimize CSS, `boolean` or options for `cssnano`.\n\n### sourceMap\n\nType: `boolean` `\"inline\"`\n\nEnable sourceMap.\n\n### parser\n\nType: `string` `function`\n\nPostCSS parser, like `sugarss`.\n\n### stringifier\n\nType: `string` `function`\n\nPostCSS Stringifier.\n\n### syntax\n\nType: `string` `function`\n\nPostCSS Syntax.\n\n### exec\n\nType: `boolean`\n\nEnable PostCSS Parser support in `CSS-in-JS`.\n\n### config\n\nType: `boolean` `object`<br>\nDefault: `true`\n\nLoad PostCSS config file.\n\n#### config.path\n\nType: `string`\n\nThe path to config file, so that we can skip searching.\n\n#### config.ctx\n\nType: `object`\n\n[`ctx`](https://github.com/michael-ciniawsky/postcss-load-config#context) argument for PostCSS config file.\n\nNote: Every keys you pass to `config.ctx` will be available under `options` inside\nthe postcss config.\n\n```js\n// rollup.config.js\npostcss({\n  config: {\n    ctx: {\n      foo: 'bar'\n    }\n  }\n})\n\n// postcss.config.js\nmodule.exports = context => {\n  console.log(context.options.foo) // 'bar'\n\n  return {}\n}\n```\n\n### use\n\nType: `name[]` `[name, options][]`<br>\nDefault: `['sass', 'stylus', 'less']`\n\nUse a loader, currently built-in loaders are:\n\n- `sass` (Support `.scss` and `.sass`)\n- `stylus` (Support `.styl` and `.stylus`)\n- `less` (Support `.less`)\n\nThey are executed from right to left.\n\n### loaders\n\nType: `Loader[]`\n\nAn array of custom loaders, check out our [sass-loader](./src/sass-loader.js) as example.\n\n```js\ninterface Loader {\n  name: string,\n  test: RegExp,\n  process: (this: Context, input: Payload) => Promise<Payload> | Payload\n}\n\ninterface Context {\n  /** Loader options */\n  options: any\n  /** Sourcemap */\n  sourceMap: any\n  /** Resource path */\n  id: string\n}\n\ninterface Payload {\n  /** File content */\n  code: string\n  /** Sourcemap */\n  map?: string | SourceMap\n}\n```\n\n### onImport\n\nType: `id => void`\n\nA function to be invoked when an import for CSS file is detected.\n\n## License\n\nMIT &copy; [EGOIST](https://github.com/egoist)\n","readmeFilename":"README.md"}