Skip to content
This repository has been archived by the owner on Nov 16, 2019. It is now read-only.

Latest commit

 

History

History
43 lines (30 loc) · 1.16 KB

GULP_README.md

File metadata and controls

43 lines (30 loc) · 1.16 KB

gulp-dr-frankenstyle

Build Status

Dr Frankenstyle gulp plugin to resolve CSS dependencies.

Install

npm install --save-dev gulp-dr-frankenstyle

Basic Usage

Because Dr. Frankenstyle uses streams and vinyl under the hood, it's super easy to use with Gulp!

var drFrankenstyle = require('dr-frankenstyle');
var gulp = require('gulp');

gulp.task('css', function() {
  return drFrankenstyle()
    .pipe(gulp.dest('<output-dir>'));
});

Options

Rails URLs

If you have a Rails project and you're using the asset pipeline, you probably want to use Rails' asset-url helper. (I.e. your css would have rules like background: asset-url('path/to/image.png') instead of background: url('path/to/image.png').) Dr. Frankenstyle has an option that will replace all urls with asset-urls

gulp.task('css', function() {
  return drFrankenstyle()
    .pipe(drFrankenstyle.railsUrls())
    .pipe(gulp.dest('<output-dir>'));
});

(c) Copyright 2015 Pivotal Software, Inc. All Rights Reserved.