Giter VIP home page Giter VIP logo

gulp-rewrite-css's Introduction

#gulp-rewrite-css

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:

    key description
    sourceDir the path in which the currently processed CSS file resides in
    sourceFile the path to the currently processed CSS file
    destinationDir the path of the target directory where the CSS file ends in
    targetFile the path of the target file (e.g. the contents of url(…) or @import)

License

MIT (c) 2016 Joscha Feth [email protected]

gulp-rewrite-css's People

Contributors

00dani avatar frankszymanski avatar greenkeeperio-bot avatar jorrit avatar joscha avatar lswierzewski avatar sdvcrx avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.