Skip to content

Instantly share code, notes, and snippets.

@ayyash
Created January 28, 2019 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayyash/a33eee2f812fc9113703b3e4864e9497 to your computer and use it in GitHub Desktop.
Save ayyash/a33eee2f812fc9113703b3e4864e9497 to your computer and use it in GitHub Desktop.
Extract material icons svg files from repo
// 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