Example #1
0
gulp.task('sprites', function () {
  var spriteData = gulp.src(['src/img/sprites/*.png'])
  .pipe(spritesmith({
    imgName: 'sprite.png',
    cssName: '../css/sprite.css'
  }));
  return spriteData.pipe(gulp.dest('src/img'));
});
gulp.task('sprite', function() {
    var spriteData = gulp.src('app/img/*.png').pipe(spritesmith({
        imgName: 'sprite.png',
        cssName: 'sprite.css',
        padding: 2
    }));
    return spriteData.pipe(gulp.dest('temp'));
});
Example #3
0
gulp.task('sprite:insight', function () {
    var iconMenuUserSprite = gulp.src('./images/insights/*.png').pipe(spritesmith({
        imgName: 'insight_spritesheet.png',
        imgPath: '../images/insights/insight_spritesheet.png',
        cssName: '_insight_spritesheet.scss'
    }));
    return iconMenuUserSprite.pipe(gulp.dest('./images/insights/'));
});
Example #4
0
gulp.task('sprite', function () {
  var spriteData = gulp.src('app/img/sprites/*.png').pipe(spritesmith({
    imgName: 'sprite.png',
    cssName: 'sprite.css'
  }));
  spriteData.img.pipe(gulp.dest('app/img')); // путь, куда сохраняем картинку
  spriteData.css.pipe(gulp.dest('app/css')); // путь, куда сохраняем стили
});
Example #5
0
gulp.task('sprite:contact', function () {
  var memberTypeSprite = gulp.src('./images/contact/member_type_icons/*.png').pipe(spritesmith({
    imgName: 'member_types_green_spritesheet.png',
    imgPath: '../images/contact/member_types_green_spritesheet.png',
    cssName: '_member_types_sprites.scss'
  }));
  return memberTypeSprite.pipe(gulp.dest('./images/contact/'));
});
Example #6
0
gulp.task('sprite:menu', function () {
    var iconMenuUserSprite = gulp.src('./images/icon-menu/*.png').pipe(spritesmith({
        imgName: 'icon_menu_user_dropdown.png',
        imgPath: '../images/icon-menu/icon_menu_user_dropdown.png',
        cssName: '_icon_menu_user_dropdown.scss'
    }));
    return iconMenuUserSprite.pipe(gulp.dest('./images/icon-menu/'));
});
Example #7
0
gulp.task('sprite', function() {
  var spriteData = gulp.src(_imgArr)
    .pipe(spritesmith({
      imgName: 'sprite.png',
      cssName: 'sprite.css'
    }));
  return spriteData.pipe(gulp.dest('dist/sprite/'));
});
Example #8
0
gulp.task('sprite', function () {
  var spriteData = gulp.src('app/images/sprites/*.*').pipe(spritesmith({
    imgName: '../images/sprite.png',
    cssName: '_sprite.scss'
  }));
  spriteData.img.pipe(gulp.dest('app/images/'));
  spriteData.css.pipe(gulp.dest('app/styles/'));
});
Example #9
0
gulp.task('sprite', function () {
  return gulp.src('static_dev/images_sprite/*.png')
        .pipe(spritesmith({
            imgName: 'sprite.png',
            cssName: 'sprite.css'
        }))
        .pipe(gulp.dest('static_dev/css/'));
});
Example #10
0
gulp.task("build:visuals_sprite", function () {
    var spriteData = gulp.src("src/Clients/Visuals/images/sprite-src/*.png").pipe(spritesmith({
        imgName: "images/visuals.sprites.png",
        cssName: "styles/sprites.less"
    }));

    return spriteData.pipe(gulp.dest("src/Clients/Visuals/"));
});
Example #11
0
gulp.task('SpriteIcons', function () {
  return gulp.src('project/public/assets/images/icons/png/min/*')
  .pipe(spritesmith({
    imgName: 'sprite.png',
    cssName: 'sprite.css'
  }))
  .pipe(gulp.dest('project/public/assets/styles/local'));
});
Example #12
0
gulp.task('sprite', function () {
  var spriteData = gulp.src('public/assets/images/*.png').pipe(spritesmith({
    imgName: 'stats_sprites.png',
    cssName: 'stats_sprites.css'
  }));
  
  return spriteData.pipe(gulp.dest('public/assets/sprites/'));
});
Example #13
0
gulp.task('sprite', function () {
  var spriteData = gulp.src(imagesDir + 'icons/*.png').pipe(spritesmith({
    padding: 10,
    imgName: imagesDir + 'icons.png',
    cssName: scssDir + 'modules/_icons.scss'
  }));
  return spriteData.pipe(gulp.dest('.'));
});
Example #14
0
	gulp.task('sprite', function () {
  var spriteData = gulp.src('src/img/sprt/*.png')
  .pipe(spritesmith({
    imgName: 'sprite.png',
    cssName: 'sprite.css'
  }));
  return spriteData.pipe(gulp.dest('build/img'));
});
Example #15
0
gulp.task("sprite-png", function () {
  var spriteData = gulp.src("src/images/sprite/*.png").pipe(spritesmith({
    imgName: "sprite.png",
    cssName: "sprite.css"
  }))
  .pipe(clean())
  return spriteData.pipe(gulp.dest("src/images/"));
});
Example #16
0
gulp.task('sprite', function () {
  var spriteData = gulp.src('images/spite/*.jpg').pipe(spritesmith({
    imgName: 'sprite.png',
    algorithm: 'left-right',
    cssName: 'sprite.css'
  }));
  return spriteData.pipe(gulp.dest('images/spite/output/'));
});
Example #17
0
gulp.task('sprite', function () {
  var spriteData = gulp.src('src/img/ico*.png').pipe(spritesmith({
    imgName: 'sprite.png',
    cssName: 'sprite.css',
    padding: 10,
  }));
  return spriteData.pipe(gulp.dest('src/css/'));
});
gulp.task('sprite', function () {
  var spriteData = gulp.src('sprites/cuisine/*.jpg').pipe(spritesmith({
    imgName: 'sprite2.png',
    cssName: 'sprite2.scss',
    padding: 70
  }));
  return spriteData.pipe(gulp.dest('site/images'));
});
Example #19
0
gulp.task('sprite', function () {
  var spriteData = gulp.src(sources.sprite.src).pipe(spritesmith({
    imgName: 'sprite.png',
    imgPath: '../img/sprite.png',
    cssName: '_sprite.scss'
  }));
  return spriteData.pipe(gulpIf('*.png', gulp.dest(
    destinations[TARGET].img), gulp.dest('./src/sass/components/')));
});
Example #20
0
gulp.task('sprite:build', function () {
    var spriteData = gulp.src('src/sprites/*.png').pipe(spritesmith({
        imgName: 'sprite.png',
        imgPath: '../img/sprites/sprite.png',
        cssName: '../../style/partials/_sprite.scss',
        padding: 20
    }));
    return spriteData.pipe(gulp.dest('src/img/sprites'));
});
Example #21
0
gulp.task('build:sprite', function () {
  return gulp.src('src/client/assets/images/icons/**/*.png')
    .pipe(spritesmith({
      imgName: 'sprite.png',
      cssName: 'sprite.css',
      algorithm: 'binary-tree'
    }))
    .pipe(gulp.dest('dist/client'));
});
Example #22
0
gulp.task('sprites:generate', function () {
    var spriteData = gulp.src('./app/img/sprites/*.png')
        .pipe(spritesmith({
            imgName: 'images/sprites.png',
            cssName: '_sprites.css'
        }));
    spriteData.img.pipe(gulp.dest('./app/assets/css/images'));
    spriteData.css.pipe(gulp.dest('./app/scss'));
});
Example #23
0
gulp.task('sprite',function(){
	var spriteData = gulp.src('dev/img/icons/*.png.').pipe(spritecreator({
		imgName:'sprite.png',
		cssName:'sprite.css',
		algorithm: 'binary-tree'
	}));
	spriteData.img.pipe(gulp.dest('build/img/'));
	spriteData.img.pipe(gulp.dest('build/css/'));
});
Example #24
0
gulp.task("sprite-css", function () {
    var spriteData = gulp.src(path.icon)
        .pipe(spritesmith({
            imgName: 'sprite.png',
            cssName: 'sprite.css',
            padding: 5
        }));
    return spriteData.pipe(gulp.dest(path.spritePath));
});
Example #25
0
gulp.task('sprite', function() {
    gulp.src(APP.sprite+'**/*.png') // source path of the sprite images
        .pipe(spritesmith({
            imgName: 'sprite.png',
            cssName: 'sprite.css',
            algorithm: 'binary-tree'//存放的样式,有top-down,left-right,binary-tree,默认是binary-tree
        }))
        .pipe(gulp.dest(Dist.sprite));
});
function spritesTask() {
  let sprite = gulp
    .src(sprites.src)
    .pipe(plumber())
    .pipe(spritesmith(options))

  sprite.img.pipe(gulp.dest(sprites.dest))
  sprite.css.pipe(gulp.dest('./sources/styles/components/'))
}
gulp.task('sprite:dev', function () {
  return gulp.src('app/assets/images/source/*.{png,jpg}').pipe(spritesmith({
    imgName: 'sprite.png',
    cssName: '_sprite.scss',
    imgPath: '../assets/images/sprite/sprite.png',
    padding: 10
  }))
   .pipe($.if('*.png', gulp.dest('app/assets/images/sprite'), gulp.dest('app/styles/helper')));
});
Example #28
0
gulp.task('sprite', function() {
  const spriteData = gulp.src('./src/sprites/*')
  .pipe(spritesmith({
    imgName: 'sprite.png',
    cssName: 'sprite.css'
  }));

  spriteData.pipe(gulp.dest(directory + '/sprites'));
});
Example #29
0
gulp.task('combine-png-sprite', function (cb) {
	var spriteData = gulp.src(['**/*.png', '!**/_*.png'], {cwd: 'source/static/sprite'})
		.pipe(spritesmith(options.spritesmith));

	spriteData.img.pipe(buffer()).pipe(imagemin()).pipe(gulp.dest('dest/img'));
	spriteData.css.pipe(buffer()).pipe(gulp.dest('tmp'));

	return spriteData.img.pipe(buffer());
});
Example #30
0
gulp.task('sprites_general', function () {
  var spriteData = gulp.src('./src/assets/sprites/general/*.png').pipe(spritesmith({
    imgPath: '/i/sprites-general.png',
    imgName: 'sprites-general.png',
    cssName: '../../stylus/mixins/sprites_general.styl',
    padding: 20
  }));
  return spriteData.pipe(gulp.dest('./src/assets/img/'));
});