🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

gulp-rewrite-css

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-rewrite-css

Rewrite url references in CSS

1.1.2
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

#gulp-rewrite-css

Greenkeeper badge

NPM version Build Status Coverage Status Dependency Status devDependency Status

A gulp plugin that allows rewriting url(…) and @import references in CSS

Installation

npm install gulp-rewrite-css --save-dev

Usage

var gulp = require('gulp');
var rewriteCSS = require('gulp-rewrite-css');

gulp.task('my-rewrite', function() {
  var dest = './dist/';
  return gulp.src('./static/css/*.css')
    .pipe(rewriteCSS({destination:dest}))
    .pipe(gulp.dest(dest));
});

Options

  • destination (required, String) - the target directory for the processed CSS. Paths are rewritten relatively to that directory.

  • [debug] (optional, boolean, defaults to false) - whether to log what gulp-rewrite-css is doing

  • [adaptPath] (optional, Function, defaults to the internal rewriting method of gulp-rewrite-css) - will be passed a context hash that contains the following options:

    keydescription
    sourceDirthe path in which the currently processed CSS file resides in
    sourceFilethe path to the currently processed CSS file
    destinationDirthe path of the target directory where the CSS file ends in
    targetFilethe path of the target file (e.g. the contents of url(…) or @import)

License

MIT (c) 2017 Joscha Feth joscha@feth.com

Keywords

gulpplugin

FAQs

Package last updated on 04 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts