{"_id":"strip-css-singleline-comments","_rev":"7-0a73b01adc7c5e90524ce8b0677b5ded","name":"strip-css-singleline-comments","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"strip-css-singleline-comments","version":"1.0.0","keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments"],"author":{"name":"Simon Lydell"},"license":"MIT","_id":"strip-css-singleline-comments@1.0.0","maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"bin":{"strip-css-singleline-comments":"strip-css-singleline-comments"},"dist":{"shasum":"e77f540f4f0fd57ae3d24b63d812e2a4637c84bb","tarball":"https://registry.npmjs.org/strip-css-singleline-comments/-/strip-css-singleline-comments-1.0.0.tgz","integrity":"sha512-QPq32WLhs5el1KZ+gZvQ1YPwNCeQLOYFaB81Max6+t5Lw03m6qAqa2OPV5iF12ltw/r71RX5qYREZmDX7ZGt8Q==","signatures":[{"sig":"MEQCIGjtbRltEPpEctOfTxHDF39ZbVZ/aR2Lfd6l3NQwgT9HAiBgWoTrVbtVRw3QHIM0EjS2lKxe+Y21pLVcIIpK3Yxh1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"e77f540f4f0fd57ae3d24b63d812e2a4637c84bb","gitHead":"916258f45110761f233921485882ca50300b5085","scripts":{"test":"gulp test","bench":"gulp bench"},"_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"repository":{"url":"git+https://github.com/lydell/strip-css-singleline-comments.git","type":"git"},"_npmVersion":"2.8.3","description":"Adds support for singleline comments in CSS.","_nodeVersion":"1.8.1","dependencies":{"through2":"^1.1.1"},"devDependencies":{"gulp":"^3.8.11","gulp-tap":"^0.1.3","bootstrap":"^3.3.4","gulp-diff":"^0.3.1","gulp-bench":"^1.1.0","gulp-buffer":"0.0.2","gulp-concat":"^2.5.2","concat-stream":"^1.4.8","strip-css-comments":"^2.0.2"},"directories":{},"deprecated":"Unmaintained, incomplete"},"1.0.1":{"name":"strip-css-singleline-comments","version":"1.0.1","keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments","gulpfriendly"],"author":{"name":"Simon Lydell"},"license":"MIT","_id":"strip-css-singleline-comments@1.0.1","maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"bin":{"strip-css-singleline-comments":"strip-css-singleline-comments"},"dist":{"shasum":"b6ff161fc8bda02a0d37673d0ae1571183686aca","tarball":"https://registry.npmjs.org/strip-css-singleline-comments/-/strip-css-singleline-comments-1.0.1.tgz","integrity":"sha512-jB8hKprb91FKlTtGKQCxKxt9mha9BTlhR6bgRQOH9ptry6U6tVuqjIkiFKomVn0lruTvk0Bt0Cc0hodWnVnzEQ==","signatures":[{"sig":"MEUCIQCEUfDUbYoOkHcBd0dfCRqmZFoz0MyXpiIIcLK94xPxMgIgGSDHf3NWvxT5V/PvIrzGYjxk7h3g6t/NL5lWlfCamS0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"b6ff161fc8bda02a0d37673d0ae1571183686aca","gitHead":"4bac461f931687379fd298668126cdf97bfb2b3b","scripts":{"test":"gulp test","bench":"gulp bench"},"_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"repository":{"url":"git+https://github.com/lydell/strip-css-singleline-comments.git","type":"git"},"_npmVersion":"2.8.3","description":"Adds support for singleline comments in CSS.","_nodeVersion":"1.8.1","dependencies":{"through2":"^1.1.1"},"devDependencies":{"gulp":"^3.8.11","gulp-tap":"^0.1.3","bootstrap":"^3.3.4","gulp-diff":"^0.3.1","gulp-bench":"^1.1.0","gulp-buffer":"0.0.2","gulp-concat":"^2.5.2","concat-stream":"^1.4.8","strip-css-comments":"^2.0.2"},"directories":{},"deprecated":"Unmaintained, incomplete"},"1.0.2":{"name":"strip-css-singleline-comments","version":"1.0.2","keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments","gulpfriendly"],"author":{"name":"Simon Lydell"},"license":"MIT","_id":"strip-css-singleline-comments@1.0.2","maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"bin":{"strip-css-singleline-comments":"strip-css-singleline-comments"},"dist":{"shasum":"97e2782fd468ba3ea36a98f74a2e3f98cdf1f236","tarball":"https://registry.npmjs.org/strip-css-singleline-comments/-/strip-css-singleline-comments-1.0.2.tgz","integrity":"sha512-rcmgtjfp8st+vCZu1kftLzdo41ZNfAJmTaSs4sBZBWQmiExc42NwWqcq/Y6tV+5Z+/4J9hmZiiCEPAW26P9qAQ==","signatures":[{"sig":"MEQCIB9GKzKd3gygVDvEBhe5ozgchOsymggxr8Z1DeF2Vid1AiBu6WilDys7SHpeVOcS7x1znlRFcX1bsvI9lfwmAR5raQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"97e2782fd468ba3ea36a98f74a2e3f98cdf1f236","gitHead":"1f52e6fcb925128420b8de217564a41a1b6d0d24","scripts":{"test":"gulp test","bench":"gulp bench"},"_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"repository":{"url":"git+https://github.com/lydell/strip-css-singleline-comments.git","type":"git"},"_npmVersion":"2.8.3","description":"Adds support for singleline comments in CSS.","_nodeVersion":"1.8.1","dependencies":{"through2":"^1.1.1"},"devDependencies":{"gulp":"^3.8.11","gulp-tap":"^0.1.3","bootstrap":"^3.3.4","gulp-diff":"^0.3.1","gulp-bench":"^1.1.0","gulp-buffer":"0.0.2","gulp-concat":"^2.5.2","concat-stream":"^1.4.8","strip-css-comments":"^2.0.2"},"directories":{},"deprecated":"Unmaintained, incomplete"},"1.1.0":{"name":"strip-css-singleline-comments","version":"1.1.0","keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments","gulpfriendly"],"author":{"name":"Simon Lydell"},"license":"MIT","_id":"strip-css-singleline-comments@1.1.0","maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"bin":{"strip-css-singleline-comments":"strip-css-singleline-comments"},"dist":{"shasum":"76c7266c8adae8806b54496e352b98b397352a90","tarball":"https://registry.npmjs.org/strip-css-singleline-comments/-/strip-css-singleline-comments-1.1.0.tgz","integrity":"sha512-XLiYnECqmH3ad1HswnPeZIBl5s5dckYu/VWM8UG8v0zVrw7Xbgx07JlVTJCoFCYhf9J/yZ5vL+LKg5es0hIhWA==","signatures":[{"sig":"MEQCIC15jDNMugTvFSxqzqkjmC6X3cREj3w4BIrIH6dQKakRAiAUNfKEBzVwLFKU6VW2pYo4DMvtNmqmCCYiNS1UgjqFhA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"76c7266c8adae8806b54496e352b98b397352a90","gitHead":"ff5b9fc5fae0a00e5a9fc88d5c136de1429abe22","scripts":{"test":"gulp test","bench":"gulp bench"},"_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"repository":{"url":"git+https://github.com/lydell/strip-css-singleline-comments.git","type":"git"},"_npmVersion":"2.8.3","description":"Adds support for singleline comments in CSS.","_nodeVersion":"1.8.1","dependencies":{"through2":"^1.1.1"},"devDependencies":{"gulp":"^3.8.11","gulp-tap":"^0.1.3","bootstrap":"^3.3.4","gulp-diff":"^0.3.1","gulp-bench":"^1.1.0","gulp-buffer":"0.0.2","gulp-concat":"^2.5.2","concat-stream":"^1.4.8","strip-css-comments":"^2.0.2"},"directories":{},"deprecated":"Unmaintained, incomplete"}},"time":{"created":"2015-05-02T15:08:55.356Z","modified":"2024-09-17T21:08:13.775Z","1.0.0":"2015-05-02T15:08:55.356Z","1.0.1":"2015-05-02T18:05:42.211Z","1.0.2":"2015-05-06T19:03:01.702Z","1.1.0":"2015-05-06T19:39:40.968Z"},"bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"author":{"name":"Simon Lydell"},"license":"MIT","homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments","gulpfriendly"],"repository":{"url":"git+https://github.com/lydell/strip-css-singleline-comments.git","type":"git"},"description":"Adds support for singleline comments in CSS.","maintainers":[{"name":"lydell","email":"simon.lydell@gmail.com"}],"readme":"Overview [![Build Status](https://travis-ci.org/lydell/strip-css-singleline-comments.svg?branch=master)](https://travis-ci.org/lydell/strip-css-singleline-comments)\n========\n\nAdds support for singleline comments in CSS, by stripping them away.\n\n```scss\n/**\n * OOCSS-style Media block\n */\n.media {\n  // TODO\n}\n\n.media > .mediaImg {\n  float: left; // TODO add clearfix\n  // margin-right: 1em;\n  margin-right: 10px; // Use pixels for now\n}\n\n\n/**\n * Brand image as background\n *\n * Note: Uses protocol-relative url (`//example.com`).\n */\n.brand-bg {\n  background: url('//example.com/brand-bg.png') no-repeat center\n}\n```\n\n→\n\n```css\n/**\n * OOCSS-style Media block\n */\n.media {\n  \n}\n\n.media > .mediaImg {\n  float: left; \n  \n  margin-right: 10px; \n}\n\n\n/**\n * Brand image as background\n *\n * Note: Uses protocol-relative url (`//example.com`).\n */\n.brand-bg {\n  background: url('//example.com/brand-bg.png') no-repeat center\n}\n```\n\n\nInstallation\n============\n\n`npm install strip-css-singleline-comments`\n\n```js\nvar strip = require(\"strip-css-singleline-comments\")\nvar stripSync = require(\"strip-css-singleline-comments/sync\")\n```\n\n\nUsage\n=====\n\nGeneral\n-------\n\n```js\nvar strip = require(\"strip-css-singleline-comments\")\n\nfs.createReadStream(\"input.css\")\n  .pipe(strip())\n  .pipe(fs.createWriteStream(\"output.css\"))\n```\n\nThe above is a bit like:\n\n```sh\nsed <input.css 's#//.*##' >output.css\n```\n\nThe difference is that strip-css-singleline-comments does not alter regular\n`/**/` comments as well as single- and double-quoted strings.\n\nIt is intended to be used with CSS, but can be used with anything where you want\nto remove `//`-style comments and it makes sense to make the above exclusions.\n\n`strip()` returns a [`through2@1`] stream.\n\nThere’s also a sync interface:\n\n```js\nvar stripSync = require(\"strip-css-singleline-comments/sync\")\n\nstripSync(fs.readFileSync(\"output.css\"))\n```\n\n[`through2@1`]: https://www.npmjs.com/package/through2\n\nGulp\n----\n\nFor example usage with [gulp], please see the first task in\n[gulpfile.js][gulpfile.js].\n\n[gulp]: http://gulpjs.com/\n\nCLI\n---\n\nThis module also ships with a really simple CLI program.\n\n```sh\nstrip-css-singleline-comments <input.css >output.css\n```\n\n\nSource maps\n===========\n\nstrip-css-singleline-comments does not break source maps, because it neither\nadds nor removes any lines, and only modifies lines at the ends.\n\n\nSpeed\n=====\n\nOn my machine, stripping all singleline comments from all .less files in\n[bootstrap] takes about 340ms. You can time it yourself by running:\n\n```sh\ngulp bench-prepare && time ./strip-css-singleline-comments <bootstrap.all.less\n```\n\nThere’s also a benchmark available, which reports around 514 ops/sec on my\ncomputer.\n\nThe benchmark also compares with [strip-css-comments], and on my computer it\nseems to be about 7 times slower. I don’t know how fair that comparison is,\nthough, because:\n\n- strip-css-comments does not do the same thing, only something similar: It\n  strips valid CSS block comments.\n- There are not that many block comments in the .less files used in the\n  benchmark. On the other hand, there are lots of singleline comments.\n\nTo run the benchmark: `npm run bench`.\n\n[strip-css-comments]: https://github.com/sindresorhus/strip-css-comments\n\n\nLicense\n=======\n\n[The X11 (“MIT”) License](LICENSE).\n","readmeFilename":"readme.md"}