{"name":"postcss-discard-comments","version":"8.0.3","keywords":["css","comments","postcss","postcss-plugin"],"author":{"url":"https://beneb.info","name":"Ben Briggs","email":"beneb.info@gmail.com"},"license":"MIT","_id":"postcss-discard-comments@8.0.3","maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"},{"name":"trysound","email":"opensource@trysound.io"},{"name":"ludovicofischer","email":"livrerie@gmail.com"},{"name":"ai","email":"andrey@sitnik.es"},{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"andyjansson","email":"jansson.andy@gmail.com"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},{"name":"cssnano-bot","email":"sahaaniketh@gmail.com"}],"homepage":"https://github.com/cssnano/cssnano","bugs":{"url":"https://github.com/cssnano/cssnano/issues"},"dist":{"shasum":"ae1abc7d25fc6d03ca66f37c7f7226e9a1e0e28e","tarball":"http://registry-npm.ywwl.com/postcss-discard-comments/download/postcss-discard-comments-8.0.3.tgz","fileCount":12,"integrity":"sha512-oDe4ITEfp1/113ebPi/ujyfWX2E9+vbHhY0dPnypgHwIgw8LBQ7MczmtAbccw8gUs+Zlmgt80qtTKS0t8eCi+Q==","signatures":[{"sig":"MEUCIQC3NOCdSZCAYIOFZw0ihAlLqxiQv7t8Dk3UfmQ/50+QxAIgdF0oi72Mv5YB4UwCZDUdBRRCPrxIAMcx5v6pKnhzG/g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-discard-comments@8.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17798,"size":5556,"noattachment":false,"key":"/postcss-discard-comments/-/postcss-discard-comments-8.0.3.tgz"},"engines":{"node":"^22.11.0 || ^24.11.0 || >=26.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"},"./src":"./src/index.js","./src/index":"./src/index.js","./src/lib/*":"./src/lib/*.js","./package.json":"./package.json","./src/index.js":"./src/index.js","./src/lib/*.js":"./src/lib/*.js"},"scripts":{"test":"node --test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"ludovicofischer","email":"livrerie@gmail.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:781f8d87-663d-4251-9ab4-780b48fdf0cc"}},"repository":{"url":"cssnano/cssnano","type":"git"},"description":"Discard comments in your CSS files with PostCSS.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"postcss-selector-parser":"^7.1.5"},"_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.5.26","postcss-scss":"^4.0.9","postcss-simple-vars":"^7.0.1"},"peerDependencies":{"postcss":"^8.5.26"},"_npmOperationalInternal":{"tmp":"tmp/postcss-discard-comments_8.0.3_1786312619876_0.8126192448952902","host":"s3://npm-registry-packages-npm-production"},"readme":"# [postcss][postcss]-discard-comments\n\n> Discard comments in your CSS files with PostCSS.\n\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-discard-comments) do:\n\n```\nnpm install postcss-discard-comments --save\n```\n\n\n## Example\n\n### Input\n\n```css\nh1/* heading */{\n    margin: 0 auto\n}\n```\n\n### Output\n\n```css\nh1 {\n    margin: 0 auto\n}\n```\n\nThis module discards comments from your CSS files; by default, it will remove\nall regular comments (`/* comment */`) and preserve comments marked as important\n(`/*! important */`).\n\nNote that this module does not handle source map comments because they are not\navailable to it; PostCSS handles this internally, so if they are removed then\nyou will have to [configure source maps in PostCSS][maps].\n\n[maps]: https://github.com/postcss/postcss/blob/master/docs/source-maps.md\n\n\n## API\n\n### comments([options])\n\n#### options\n\n##### remove(function)\n\nType: `function`\nReturn: `boolean`\nVariable: `comment` contains a comment without `/**/`\n\nFor each comment, return true to remove, or false to keep the comment.\n\n```js\nfunction(comment) {}\n```\n\n```js\nvar css = '/* headings *//*@ h1 */h1{margin:0 auto}/*@ h2 */h2{color:red}';\nconsole.log(postcss(comments({\n    remove: function(comment) { return comment[0] == \"@\"; }\n})).process(css).css);\n//=> /* headings */h1{margin:0 auto}h2{color:red}\n```\n**NOTE:** If you use the `remove` function other options will not be available.\n\n##### removeAll\n\nType: `boolean`\nDefault: `false`\n\nRemove all comments marked as important.\n\n```js\nvar css = '/*! heading */h1{margin:0 auto}/*! heading 2 */h2{color:red}';\nconsole.log(postcss(comments({removeAll: true})).process(css).css);\n//=> h1{margin:0 auto}h2{color:red}\n```\n\n##### removeAllButFirst\n\nType: `boolean`\nDefault: `false`\n\nRemove all comments marked as important, but the first one.\n\n```js\nvar css = '/*! heading */h1{margin:0 auto}/*! heading 2 */h2{color:red}';\nconsole.log(postcss(comments({removeAllButFirst: true})).process(css).css);\n//=> /*! heading */h1{margin:0 auto}h2{color:red}\n```\n\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/main/CONTRIBUTORS.md).\n\n\n## License\n\nMIT © [Ben Briggs](https://beneb.info)\n\n\n[postcss]: https://github.com/postcss/postcss\n","publish_time":1786312619958,"_cnpm_publish_time":1786312619958,"dist-tags":{"latest":"9.0.8","next":"5.0.0-rc.2","nightly":"4.0.0-nightly.2020.2.6"}}