Socket
Socket
Sign inDemoInstall

coveo-png-sprite

Package Overview
Dependencies
295
Maintainers
7
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    coveo-png-sprite

Gulp task that converts images to sprites+css


Version published
Weekly downloads
1
decreased by-90.91%
Maintainers
7
Install size
6.49 MB
Created
Weekly downloads
 

Readme

Source

coveo-png-sprite

npm dependencies Code Climate license

coveo-png-sprite is a gulp module that creates sprite sheets from multiple images

var gulp = require('gulp');
var pngSprite = require('coveo-png-sprite');

gulp.task('buildSprites', function (done) {
  return gulp.src('img/**/*.png')
      .pipe(pngSprite.gulp({
        cssPath: 'sprites.scss',
        pngPath: 'sprites.png',
        namespace: 'sprites'
      }))
      .pipe(gulp.dest('./target/'))
});
var fs = require('fs');
var Sprite = require('coveo-png-sprite').Sprite;
var sprite = new Sprite();
sprite.addImageSrc([
  "./img/a.png",
  "./img/b.png",
  "./img/c.png",
  "./img/d.png"
], function(){
  var obj = sprite.compile('./sprite.png');
  obj.png.pipe(fs.createWriteStream('sprite.png'));
  fs.writeFile('sprite.css', obj.css);
});

Keywords

FAQs

Last updated on 18 Mar 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc