gcp

gulp-class-prefix

Add a class prefix to further sandbox CSS styling for third-party imports.

Showing:

Popularity

Downloads/wk

2.9K

GitHub Stars

5

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

3

Size (min+gzip)

18.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gulp-class-prefix Build Status

Gulp plugin to prefix classes in a CSS file.

Installation

npm install --save gulp-class-prefix

Usage

var gulp        = require('gulp'),
    classPrefix = require('gulp-class-prefix');

gulp.task('prefix', function() {
  return gulp.src('my-file.css')
    .pipe(classPrefix('my-class-prefix-'))
    .pipe(gulp.dest('dist'));
});

gulp.task('default', ['prefix']);

Using the ignored option:

var gulp        = require('gulp'),
    classPrefix = require('gulp-class-prefix');

gulp.task('prefix', function() {
  return gulp.src('my-file.css')
  .pipe(classPrefix('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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Crafted with <3 by John Otander (@4lpine).

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial