gulp-css-class-prefix
v0.0.1
Published
Add a class prefix to further sandbox CSS styling for third-party imports.
Downloads
8
Maintainers
Readme
gulp-css-class-prefix
Gulp plugin to prefix classes in a CSS file.
Installation
npm install --save gulp-css-class-prefix
Usage
var gulp = require('gulp'),
cssClassPrefix = require('gulp-css-class-prefix');
gulp.task('prefix', function() {
return gulp.src('my-file.css')
.pipe(cssClassPrefix('my-class-prefix-'))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['prefix']);
Using the ignored
option:
var gulp = require('gulp'),
cssClassPrefix = require('gulp-css-class-prefix');
gulp.task('prefix', function() {
return gulp.src('my-file.css')
.pipe(cssClassPrefix('my-class-prefix-', { ignored: [/\.ng-/, '.some-class'] }))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['prefix']);
License
MIT
Acknowledgements
Gulp wrapper for https://github.com/johnotander/rework-class-prefix.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request