{"_id":"postcss-discard-comments@9.0.8","bugs":{"url":"https://github.com/cssnano/cssnano/issues"},"dist":{"shasum":"58a547062201703e33e37ac8c7660ab57de72b2f","tarball":"http://registry-npm.ywwl.com/postcss-discard-comments/download/postcss-discard-comments-9.0.8.tgz","fileCount":15,"integrity":"sha512-YaHPbph+EYK2TXx1UieOtLKpBecoQE+wQmrlz6ob+OWaRwabniUJ1ugkTvHxX43inPsd1iEeJ2qxLaHJFte84Q==","signatures":[{"sig":"MEYCIQCVK0HYhR+IAd98yXgsK8MKws3TbG/au4eYLtX7t7HTkAIhALVmx72GxMPZYln/O1NJS2HpxLjj0aBJqfnwHTkt027Q","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF9E0IX78qfWovBoyMIsrH4friLYZBloDQJLmfIPfvt9AiEAwaIvPIXiaRpiICSpuxfA02vHvaASNHhyRRpFApY57SE="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-discard-comments@9.0.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24629,"size":7345,"noattachment":false,"key":"/postcss-discard-comments/-/postcss-discard-comments-9.0.8.tgz"},"main":"./src/index.js","name":"postcss-discard-comments","type":"module","types":"./types/index.d.ts","author":{"url":"https://beneb.info","name":"Ben Briggs","email":"beneb.info@gmail.com"},"engines":{"node":"^22.22.3 || ^24.15.0 || >=26.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"},"./package.json":"./package.json"},"license":"MIT","scripts":{"test":"node --test","test:mutation":"node ../../util/mutation-testing/mutation-runner.js --catalog mutation-catalog.js"},"version":"9.0.8","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"781f8d87-663d-4251-9ab4-780b48fdf0cc"}},"homepage":"https://github.com/cssnano/cssnano","keywords":["css","comments","postcss","postcss-plugin"],"repository":{"url":"git+https://github.com/cssnano/cssnano.git","type":"git"},"description":"Discard comments in your CSS files with PostCSS.","directories":{},"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"}],"dependencies":{"cssnano-utils":"^9.0.0","@csstools/css-tokenizer":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.5.29","postcss-scss":"^4.0.9","postcss-simple-vars":"^7.0.1"},"peerDependencies":{"postcss":"^8.5.29"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-discard-comments_9.0.8_1791666684959_0.21605888369022952"},"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":1791666685043,"_cnpm_publish_time":1791666685043,"dist-tags":{"latest":"9.0.8","next":"5.0.0-rc.2","nightly":"4.0.0-nightly.2020.2.6"}}