Created
April 17, 2017 22:40
-
-
Save david-j-davis/3eae8284cc667dd37e56c78c41cf7604 to your computer and use it in GitHub Desktop.
Revisions
-
david-james-davis created this gist
Apr 17, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ var retinize = require('gulp-retinize'); gulp.task('retiniizing', function(file) { /* NOTE: Retinize accepts @4x and @2x resolutions, outputting to @4x, @2x, and @1x. Overrides may be implemented by manually creating lower resolution copies in the source directory. */ const retinizeOpts = { // Your options here. }; console.log('Retinizing images...'); return gulp.src(file && file.path || './path/to/your/sprites/*.{png,jpg,jpeg}') .pipe(retinize(retinizeOpts)) .on('error', function(e) { console.log(e.message); }) .pipe(gulp.dest('./path/to/your/sprites/')); });