{"_id":"strip-css-singleline-comments","_rev":"259146","name":"strip-css-singleline-comments","description":"Adds support for singleline comments in CSS.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"lydell","email":""}],"time":{"modified":"2023-03-27T17:05:40.000Z","created":"2015-05-02T15:08:55.356Z","1.1.0":"2015-05-06T19:39:40.968Z","1.0.2":"2015-05-06T19:03:01.702Z","1.0.1":"2015-05-02T18:05:42.211Z","1.0.0":"2015-05-02T15:08:55.356Z"},"users":{},"author":{"name":"Simon Lydell"},"repository":{"type":"git","url":"git+https://github.com/lydell/strip-css-singleline-comments.git"},"versions":{"1.1.0":{"name":"strip-css-singleline-comments","version":"1.1.0","author":{"name":"Simon Lydell"},"license":"MIT","description":"Adds support for singleline comments in CSS.","main":"index.js","bin":{"strip-css-singleline-comments":"strip-css-singleline-comments"},"repository":{"type":"git","url":"git+https://github.com/lydell/strip-css-singleline-comments.git"},"keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments","gulpfriendly"],"scripts":{"bench":"gulp bench","test":"gulp test"},"dependencies":{"through2":"^1.1.1"},"devDependencies":{"bootstrap":"^3.3.4","concat-stream":"^1.4.8","gulp":"^3.8.11","gulp-bench":"^1.1.0","gulp-buffer":"0.0.2","gulp-concat":"^2.5.2","gulp-diff":"^0.3.1","gulp-tap":"^0.1.3","strip-css-comments":"^2.0.2"},"gitHead":"ff5b9fc5fae0a00e5a9fc88d5c136de1429abe22","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","_id":"strip-css-singleline-comments@1.1.0","_shasum":"76c7266c8adae8806b54496e352b98b397352a90","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"maintainers":[{"name":"lydell","email":""}],"dist":{"shasum":"76c7266c8adae8806b54496e352b98b397352a90","size":6128,"noattachment":false,"key":"/strip-css-singleline-comments/-/strip-css-singleline-comments-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/strip-css-singleline-comments/download/strip-css-singleline-comments-1.1.0.tgz"},"directories":{},"publish_time":1430941180968,"_hasShrinkwrap":false,"_cnpm_publish_time":1430941180968,"_cnpmcore_publish_time":"2021-12-16T18:40:53.954Z"},"1.0.2":{"name":"strip-css-singleline-comments","version":"1.0.2","author":{"name":"Simon Lydell"},"license":"MIT","description":"Adds support for singleline comments in CSS.","main":"index.js","bin":{"strip-css-singleline-comments":"strip-css-singleline-comments"},"repository":{"type":"git","url":"git+https://github.com/lydell/strip-css-singleline-comments.git"},"keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments","gulpfriendly"],"scripts":{"bench":"gulp bench","test":"gulp test"},"dependencies":{"through2":"^1.1.1"},"devDependencies":{"bootstrap":"^3.3.4","concat-stream":"^1.4.8","gulp":"^3.8.11","gulp-bench":"^1.1.0","gulp-buffer":"0.0.2","gulp-concat":"^2.5.2","gulp-diff":"^0.3.1","gulp-tap":"^0.1.3","strip-css-comments":"^2.0.2"},"gitHead":"1f52e6fcb925128420b8de217564a41a1b6d0d24","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","_id":"strip-css-singleline-comments@1.0.2","_shasum":"97e2782fd468ba3ea36a98f74a2e3f98cdf1f236","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"maintainers":[{"name":"lydell","email":""}],"dist":{"shasum":"97e2782fd468ba3ea36a98f74a2e3f98cdf1f236","size":5868,"noattachment":false,"key":"/strip-css-singleline-comments/-/strip-css-singleline-comments-1.0.2.tgz","tarball":"http://name.csiicloud.com:7001/strip-css-singleline-comments/download/strip-css-singleline-comments-1.0.2.tgz"},"directories":{},"publish_time":1430938981702,"_hasShrinkwrap":false,"_cnpm_publish_time":1430938981702,"_cnpmcore_publish_time":"2021-12-16T18:40:54.145Z"},"1.0.1":{"name":"strip-css-singleline-comments","version":"1.0.1","author":{"name":"Simon Lydell"},"license":"MIT","description":"Adds support for singleline comments in CSS.","main":"index.js","bin":{"strip-css-singleline-comments":"strip-css-singleline-comments"},"repository":{"type":"git","url":"git+https://github.com/lydell/strip-css-singleline-comments.git"},"keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments","gulpfriendly"],"scripts":{"bench":"gulp bench","test":"gulp test"},"dependencies":{"through2":"^1.1.1"},"devDependencies":{"bootstrap":"^3.3.4","concat-stream":"^1.4.8","gulp":"^3.8.11","gulp-bench":"^1.1.0","gulp-buffer":"0.0.2","gulp-concat":"^2.5.2","gulp-diff":"^0.3.1","gulp-tap":"^0.1.3","strip-css-comments":"^2.0.2"},"gitHead":"4bac461f931687379fd298668126cdf97bfb2b3b","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","_id":"strip-css-singleline-comments@1.0.1","_shasum":"b6ff161fc8bda02a0d37673d0ae1571183686aca","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"maintainers":[{"name":"lydell","email":""}],"dist":{"shasum":"b6ff161fc8bda02a0d37673d0ae1571183686aca","size":5584,"noattachment":false,"key":"/strip-css-singleline-comments/-/strip-css-singleline-comments-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/strip-css-singleline-comments/download/strip-css-singleline-comments-1.0.1.tgz"},"directories":{},"publish_time":1430589942211,"_hasShrinkwrap":false,"_cnpm_publish_time":1430589942211,"_cnpmcore_publish_time":"2021-12-16T18:40:54.349Z"},"1.0.0":{"name":"strip-css-singleline-comments","version":"1.0.0","author":{"name":"Simon Lydell"},"license":"MIT","description":"Adds support for singleline comments in CSS.","main":"index.js","bin":{"strip-css-singleline-comments":"strip-css-singleline-comments"},"repository":{"type":"git","url":"git+https://github.com/lydell/strip-css-singleline-comments.git"},"keywords":["css","scss","sass","style","stylesheet","comments","singleline","strip","remove","delete","trim","preprocess","transform","strip-css-comments"],"scripts":{"bench":"gulp bench","test":"gulp test"},"dependencies":{"through2":"^1.1.1"},"devDependencies":{"bootstrap":"^3.3.4","concat-stream":"^1.4.8","gulp":"^3.8.11","gulp-bench":"^1.1.0","gulp-buffer":"0.0.2","gulp-concat":"^2.5.2","gulp-diff":"^0.3.1","gulp-tap":"^0.1.3","strip-css-comments":"^2.0.2"},"gitHead":"916258f45110761f233921485882ca50300b5085","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","_id":"strip-css-singleline-comments@1.0.0","_shasum":"e77f540f4f0fd57ae3d24b63d812e2a4637c84bb","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"lydell","email":"simon.lydell@gmail.com"},"maintainers":[{"name":"lydell","email":""}],"dist":{"shasum":"e77f540f4f0fd57ae3d24b63d812e2a4637c84bb","size":5492,"noattachment":false,"key":"/strip-css-singleline-comments/-/strip-css-singleline-comments-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/strip-css-singleline-comments/download/strip-css-singleline-comments-1.0.0.tgz"},"directories":{},"publish_time":1430579335356,"_hasShrinkwrap":false,"_cnpm_publish_time":1430579335356,"_cnpmcore_publish_time":"2021-12-16T18:40:54.544Z"}},"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","_attachments":{},"homepage":"https://github.com/lydell/strip-css-singleline-comments#readme","bugs":{"url":"https://github.com/lydell/strip-css-singleline-comments/issues"},"license":"MIT"}