{"_id":"rework-class-prefix","_rev":"10-0e308dd901b3fa9fb37ad447c508f302","name":"rework-class-prefix","description":"Add a class prefix to further sandbox CSS styling.","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"rework-class-prefix","version":"0.0.1","description":"Add a class prefix to further sandbox CSS styling.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/johnotander/rework-class-prefix.git"},"keywords":["rework","class","class-prefix","css"],"author":{"name":"John Otander"},"license":"MIT","bugs":{"url":"https://github.com/johnotander/rework-class-prefix/issues"},"homepage":"https://github.com/johnotander/rework-class-prefix","dependencies":{"rework-visit":"^1.0.0"},"gitHead":"1598c19a560e41bb48fe33d093a23fd174f016b2","_id":"rework-class-prefix@0.0.1","_shasum":"d6b3690e66d1c936f8ddd587beaa335f410137e4","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"}],"dist":{"shasum":"d6b3690e66d1c936f8ddd587beaa335f410137e4","tarball":"https://registry.npmjs.org/rework-class-prefix/-/rework-class-prefix-0.0.1.tgz","integrity":"sha512-Ajvyp/G3fyj1wzSTP7vJqi2rbksLj0l7k3guQOeexA3w4ynShZNRW0LVOLJLIZd4ezdZhkGrH5YlcrP65hOTjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGD9Eu6h6ArVQQI+X2AUq/AYVrpZJ7QLf6143xzi/atTAiB28l9jjQppZSIGyN2Fu8nOuXOPHeICQSiU1V6wMpkhww=="}]}},"0.0.2":{"name":"rework-class-prefix","version":"0.0.2","description":"Add a class prefix to further sandbox CSS styling.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/johnotander/rework-class-prefix.git"},"keywords":["rework","class","class-prefix","css"],"author":{"name":"John Otander"},"license":"MIT","bugs":{"url":"https://github.com/johnotander/rework-class-prefix/issues"},"homepage":"https://github.com/johnotander/rework-class-prefix","dependencies":{"rework-walk":"^1.0.0"},"gitHead":"9b05dc550bb04bf56164cbb9f980d83584efba8a","_id":"rework-class-prefix@0.0.2","_shasum":"d64f2bc663e82ddc3db25f4ff4c4065c91fa07b0","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"}],"dist":{"shasum":"d64f2bc663e82ddc3db25f4ff4c4065c91fa07b0","tarball":"https://registry.npmjs.org/rework-class-prefix/-/rework-class-prefix-0.0.2.tgz","integrity":"sha512-nGoD+jv+a1K52L/V6B9t9F6+fpHxC05udALEw/IgSRFpEwmPbApvsfv/p0r+zmlBWP6DrgmVPssMPvsaZVpPTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF2eP3cH+/8JK+ASykhs0diG2mW6mvuPCp/qVDvQsQVqAiA1JFIEt5r5kBud7oVDxfVEefVfn4cNxPnLHLHwJoxVYA=="}]}},"0.1.0":{"name":"rework-class-prefix","version":"0.1.0","description":"Add a class prefix to further sandbox CSS styling.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/johnotander/rework-class-prefix.git"},"keywords":["rework","class","class-prefix","css"],"author":{"name":"John Otander"},"license":"MIT","bugs":{"url":"https://github.com/johnotander/rework-class-prefix/issues"},"homepage":"https://github.com/johnotander/rework-class-prefix","dependencies":{"is-present":"0.0.1","rework":"^1.0.1","rework-walk":"^1.0.0"},"devDependencies":{"mocha":"^2.0.1"},"gitHead":"b18f29a76ce49fc1ed3053ff4b7013dd5f3586fe","_id":"rework-class-prefix@0.1.0","_shasum":"be29b23defb1537f8cca813e4f0b55cbfba0702f","_from":".","_npmVersion":"2.1.9","_nodeVersion":"0.10.30","_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"}],"dist":{"shasum":"be29b23defb1537f8cca813e4f0b55cbfba0702f","tarball":"https://registry.npmjs.org/rework-class-prefix/-/rework-class-prefix-0.1.0.tgz","integrity":"sha512-DL+zm2prYsB0D83U82t/TnIfgLxY74o+UoyKNb692yPmfBhiI4jUKCil2wBdWY9C/t60lgR6Q7th3QD/2YUgsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYPp+FlJjIg4K5s76TqLRknNMDI76RjvbmyxXlPucNpQIgTYZZMN83SLvtEsqMrFZ8yPC7CH7+kcOBC69sS4fD3Jk="}]}},"1.0.0":{"name":"rework-class-prefix","version":"1.0.0","description":"Add a class prefix to further sandbox CSS styling.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/johnotander/rework-class-prefix.git"},"keywords":["rework","class","class-prefix","css"],"author":{"name":"John Otander"},"license":"MIT","bugs":{"url":"https://github.com/johnotander/rework-class-prefix/issues"},"homepage":"https://github.com/johnotander/rework-class-prefix","dependencies":{"has-class-selector":"0.0.1","is-present":"0.0.1","rework":"^1.0.1"},"devDependencies":{"mocha":"^2.0.1"},"gitHead":"1bdf8301992acd1f1400df7ec62ef4c5a87a03cd","_id":"rework-class-prefix@1.0.0","_shasum":"0057a11b8ebc5357e117b1900eac4524ab88295a","_from":".","_npmVersion":"2.5.0","_nodeVersion":"0.10.35","_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"}],"dist":{"shasum":"0057a11b8ebc5357e117b1900eac4524ab88295a","tarball":"https://registry.npmjs.org/rework-class-prefix/-/rework-class-prefix-1.0.0.tgz","integrity":"sha512-fEmSIDw7tt5YXCqv3YwSp1uempLZdYYcSzG6q+H24qxJXZSkpgmo4NX0x/bRWWTY5Iyh86mRVUc/WxwDAfQHEw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHeXATw4Y23u+hbYy4hKig0SNyVK1prIc7O3wps4HZZmAiEA6XXUv04MYs6qorwhJvCdrEkYtivkSJVXNti4awzkMCc="}]}},"1.0.1":{"name":"rework-class-prefix","version":"1.0.1","description":"Add a class prefix to further sandbox CSS styling.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/johnotander/rework-class-prefix.git"},"keywords":["rework","class","class-prefix","css"],"author":{"name":"John Otander"},"license":"MIT","bugs":{"url":"https://github.com/johnotander/rework-class-prefix/issues"},"homepage":"https://github.com/johnotander/rework-class-prefix","dependencies":{"has-class-selector":"0.0.1","is-present":"0.0.1","rework":"^1.0.1"},"devDependencies":{"mocha":"^2.0.1"},"gitHead":"91845b834ec309877c0ed0d766872c5efc858a7b","_id":"rework-class-prefix@1.0.1","_shasum":"ebc9ecf110f8d61d0f609952381268689d90ddb9","_from":".","_npmVersion":"2.10.0","_nodeVersion":"0.12.2","_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"dist":{"shasum":"ebc9ecf110f8d61d0f609952381268689d90ddb9","tarball":"https://registry.npmjs.org/rework-class-prefix/-/rework-class-prefix-1.0.1.tgz","integrity":"sha512-DA6yZ27KlPV0tnrXTFL9NEQ2ZQ4qybi2Mm8YGOjnCwzUcsPr+S7/h0f6WOgOYuvNU6Xi22BxbpJKVK/1A7PXJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/uWaHJCbCgiO5iWcQ+GRGvykwdnPmBtUa2Jnf6golswIgZcdc21l3QDhsqMPZhuFtAAOWIZCyX2hDLs/kmGL6HOU="}]},"maintainers":[{"name":"johno","email":"johnotander@gmail.com"}]}},"readme":"# rework-class-prefix [![Build Status](https://travis-ci.org/johnotander/rework-class-prefix.svg?branch=master)](https://travis-ci.org/johnotander/rework-class-prefix)\n\nAdd a class prefix to further sandbox CSS styling for third-party imports.\n\nThis comes in handy when you want to import two different CSS modules that might\nhave conflictings styles. For example, if module A and module B both have a\n`.media` class selector that have different use cases, you can run them through\n`rework-class-prefix` and result in something like `.a-media` and `.b-media`.\n\n__Example input__\n\n```css\n.grid { /* ... */ }\n.grid-row { /* ... */ }\n.grid-row-col { /* ... */ }\n```\n\n__Example output__\n`classPrefix('flx-')`\n```css\n.flx-grid { /* ... */ }\n.flx-grid-row { /* ... */ }\n.flx-grid-row-col { /* ... */ }\n```\n\n## Installation\n\n```\nnpm install --save rework-class-prefix\n```\n\n## Usage\n\n```javascript\nvar fs        = require('fs'),\n    rework    = require('rework'),\n    classPrfx = require('rework-class-prefix');\n\nvar css = fs.readFileSync('css/my-file.css', 'utf8').toString();\nvar out = rework(css).use(classPrfx('my-prefix-')).toString();\n```\n#### In a gulpfile\n\n```js\nvar gulp        = require('gulp'),\n    name        = require('gulp-rename'),\n    rework      = require('gulp-rework'),\n    reworkNPM   = require('rework-npm'),\n    classPrefix = require('rework-class-prefix');\n\ngulp.task('css', function() {\n  return gulp.src('index.css')\n    .pipe(rework(reworkNPM(), classPrefix('prfx-')))\n    .pipe(name('index-prefixed.css'))\n    .pipe(gulp.dest('css'));\n});\n```\n\n### Using the `ignored` option\n\n```javascript\nvar fs        = require('fs'),\nrework    = require('rework'),\nclassPrfx = require('rework-class-prefix');\n\nvar css = fs.readFileSync('css/my-file.css', 'utf8').toString();\nvar out = rework(css).use(\n            classPrfx('my-prefix-', { ignored: [/\\.ng-/, 'some-class-to-ignore'] })\n          ).toString();\n```\n\n## License\n\nMIT\n\n## Acknowledgements\n\n* Leverages <https://github.com/intesso/rework-walk>.\n* Built on top of <https://github.com/reworkcss/rework>.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nCrafted with <3 by [John Otander](http://johnotander.com) ([@4lpine](https://twitter.com/4lpine)).\n","maintainers":[{"name":"johno","email":"johnotander@gmail.com"}],"time":{"modified":"2022-06-26T13:01:03.927Z","created":"2014-10-28T19:54:08.036Z","0.0.1":"2014-10-28T19:54:08.036Z","0.0.2":"2014-10-28T20:25:05.426Z","0.1.0":"2015-01-06T01:11:59.077Z","1.0.0":"2015-04-17T20:43:01.576Z","1.0.1":"2015-07-16T15:24:49.781Z"},"homepage":"https://github.com/johnotander/rework-class-prefix","keywords":["rework","class","class-prefix","css"],"repository":{"type":"git","url":"git+https://github.com/johnotander/rework-class-prefix.git"},"author":{"name":"John Otander"},"bugs":{"url":"https://github.com/johnotander/rework-class-prefix/issues"},"license":"MIT","readmeFilename":"README.md"}