Skip to content

sunify/gulp-baseimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-baseimg

Gulp plugin for generate data uri stylesheet from set of images.

##Usage

npm install gulp-baseimg --save-dev

###Example config

gulp.task('imgBase', function() {
    gulp.src('./images/data/*.png')
        .pipe(baseimg({
            styleTemplate: 'scss/data_gen.scss.mustache',
            styleName: '_data_gen.scss'
        }))
        .pipe(gulp.dest('./scss'));
});

###Options

####styleTemplate Path to mustache template

####styleName Result file name

###Template variables ####items Array of images data

####items[i].name Image filename without extension

####items[i].width & items[i].height Image width and height in pixels

####items[i].data Data URI string

About

Convert directory with images to dataUri stylesheet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published