Skip to content

johno/gulp-class-prefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published