Newton's Preposterous Miscalculation
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

gulp-css-class-prefix

0.0.1 • Public • Published

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

  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

install

npm i gulp-css-class-prefix

Downloadsweekly downloads

7

version

0.0.1

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability