{"name":"postcss-discard-comments","version":"7.0.8","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.8","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":"1eaf1d8b76572cdc50074ff9945e342af678d8dc","tarball":"http://registry-npm.ywwl.com/postcss-discard-comments/download/postcss-discard-comments-7.0.8.tgz","fileCount":12,"integrity":"sha512-CvvS5S9WrXblFXCEJ9nVo+4z+eA7zSC7Z88V1HEJuwlQhlFnYTIjg1xJY+BCUiG2bvICap2tXii4mP22BD108Q==","signatures":[{"sig":"MEUCIQCRmcPLKgLOMlStxf1dvA/4+hBIJMIW32FdC4NiQkZI+QIgYL6VM0nAlTRQ1bSqZCenZ9ofzCJcDTNbN5fCpZEkAtM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-discard-comments@7.0.8","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15953,"size":5164,"noattachment":false,"key":"/postcss-discard-comments/-/postcss-discard-comments-7.0.8.tgz"},"main":"src/index.js","_from":"file:postcss-discard-comments-7.0.8.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/ec8358682bceaa8794fe6ac31eb55737/postcss-discard-comments-7.0.8.tgz","_integrity":"sha512-CvvS5S9WrXblFXCEJ9nVo+4z+eA7zSC7Z88V1HEJuwlQhlFnYTIjg1xJY+BCUiG2bvICap2tXii4mP22BD108Q==","repository":{"url":"git+https://github.com/cssnano/cssnano.git","type":"git"},"_npmVersion":"11.11.0","description":"Discard comments in your CSS files with PostCSS.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"postcss-selector-parser":"^7.1.1"},"_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.5.13","postcss-scss":"^4.0.9","postcss-simple-vars":"^7.0.1"},"peerDependencies":{"postcss":"^8.5.13"},"_npmOperationalInternal":{"tmp":"tmp/postcss-discard-comments_7.0.8_1777739715843_0.2884213853688713","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":1777739715981,"_cnpm_publish_time":1777739715981,"dist-tags":{"latest":"9.0.8","next":"5.0.0-rc.2","nightly":"4.0.0-nightly.2020.2.6"}}