Skip to content

madebysource/gulp-sprites-preprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-sprites-preprocessor Build Status

Sprites Preprocessor - Generate sprites from css file

Install

$ npm install --save-dev gulp-sprites-preprocessor

Usage

var gulp = require('gulp');
var sprites = require('gulp-sprites-preprocessor');

gulp.task('default', function () {
  return gulp.src('style.css')
    .pipe(sprites({ name: 'sprite.png', path: 'images/sprites', prefix: '/images/sprites/' }))
    .pipe(gulp.dest('dist'));
});

API

sprites(options)

Options

name

Type: String Default: sprite.png

Name of the output sprite file.

path

Type: String Default: images/sprites

Path to the source image files

prefix

Type: String Default: /images/sprites/

Css prefix in image url to know what images transform into sprites

License

MIT license

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published