1.0.0 • Published 9 years ago

gulp-imacss v1.0.0

Weekly downloads
12
License
MIT
Repository
github
Last release
9 years ago

gulp-imacss Build Status

imacss (the image to datauri to CSS transformer) plugin for gulp

Usage

First, install gulp-imacss as a development dependency:

npm install --save-dev gulp-imacss

Then, add it to your gulpfile.js:

var imacss = require('gulp-imacss');

gulp.task('imacss', function () {
    gulp.src('./images/**/*.svg')
        .pipe(imacss('images.svg.css'))
        .pipe(gulp.dest('./build/'));
});

You're are also able to do something different before piping it to imacss:

var svg2png = require('gulp-svg2png');
var imacss  = require('gulp-imacss');

gulp.task('imacss', function () {
    gulp.src('./images/**/*.svg')
        .pipe(svg2png())
        .pipe(imacss('images.png.css'))
        .pipe(gulp.dest('./build/'));
});

In this case the result would be first a transformation from SVG to PNG images and then the production of the CSS file images.png.css.

API

imacss(filename , namespace)

filename

Type: String Default: undefined

Name of the CSS file that should be generated, e.g. images.svg.css.

namespace (optional)

Type: String
Default: undefined

Namespace of the CSS classes.

Author

Copyright 2014 - 2015, André König (andre.koenig@posteo.de)

1.0.0

9 years ago

0.3.0

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago