Created
January 28, 2019 12:16
-
-
Save ayyash/a33eee2f812fc9113703b3e4864e9497 to your computer and use it in GitHub Desktop.
Extract material icons svg files from repo
This file contains 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 characters
// create a simple task to take out svg from production and save it elsewhere | |
const gulp = require('gulp'); | |
var rename = require('gulp-rename'); | |
var path = require('path'); | |
exports.extract = function(){ | |
// from **/svg/production to / | |
return gulp.src('./**/svg/production/*24px.svg', {base: '.'}) | |
.pipe(rename(function(file) { | |
file.dirname = '../output/' + file.dirname.split(path.sep)[0]; | |
})) | |
.pipe(gulp.dest('../output')); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment