{"name":"postcss-discard-comments","version":"7.0.5","keywords":["css","comments","postcss","postcss-plugin"],"author":{"url":"http://beneb.info","name":"Ben Briggs","email":"beneb.info@gmail.com"},"license":"MIT","_id":"postcss-discard-comments@7.0.5","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.ru"},{"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":"0a95aa4d229a021bc441861d4773d57145ee15dd","tarball":"http://registry-npm.ywwl.com/postcss-discard-comments/download/postcss-discard-comments-7.0.5.tgz","fileCount":12,"integrity":"sha512-IR2Eja8WfYgN5n32vEGSctVQ1+JARfu4UH8M7bgGh1bC+xI/obsPJXaBpQF7MAByvgwZinhpHpdrmXtvVVlKcQ==","signatures":[{"sig":"MEYCIQD9K3ni8IdvUtGfZhDP+irG20/4+KHv6VHKrkwVaStdOwIhANkdAndn97b3MOx6KEONSGemGPOi06ws/5xSAVQeH5AD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-discard-comments@7.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15992,"size":5165,"noattachment":false,"key":"/postcss-discard-comments/-/postcss-discard-comments-7.0.5.tgz"},"main":"src/index.js","_from":"file:postcss-discard-comments-7.0.5.tgz","types":"types/index.d.ts","engines":{"node":"^18.12.0 || ^20.9.0 || >=22.0"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:85712b43-00bd-41a3-a6fc-f7714b6fb294"}},"_resolved":"/tmp/becf3a443ca9c8da944634fc4f12c118/postcss-discard-comments-7.0.5.tgz","_integrity":"sha512-IR2Eja8WfYgN5n32vEGSctVQ1+JARfu4UH8M7bgGh1bC+xI/obsPJXaBpQF7MAByvgwZinhpHpdrmXtvVVlKcQ==","repository":{"url":"git+https://github.com/cssnano/cssnano.git","type":"git"},"_npmVersion":"11.6.1","description":"Discard comments in your CSS files with PostCSS.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"postcss-selector-parser":"^7.1.0"},"_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.5.6","postcss-scss":"^4.0.9","postcss-simple-vars":"^7.0.1"},"peerDependencies":{"postcss":"^8.4.32"},"_npmOperationalInternal":{"tmp":"tmp/postcss-discard-comments_7.0.5_1761742850822_0.6668613306626758","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":1761742851007,"_cnpm_publish_time":1761742851007,"dist-tags":{"latest":"9.0.8","next":"5.0.0-rc.2","nightly":"4.0.0-nightly.2020.2.6"}}