Skip to content

Instantly share code, notes, and snippets.

Last active Apr 13, 2019
What would you like to do?
Task for using Grunticon with Gulp thanks to grunticon-lib.
var gulp = require('gulp'),
q = require('q'),
path = require('path'),
fs = require('fs'),
Grunticon = require('grunticon-lib');
gulp.task('icons', function () {
var deferred = q.defer(),
iconDir = 'app/images/icons/',
options = { enhanceSVG: true };
var files = fs.readdirSync(iconDir).map(function (fileName) {
return path.join(iconDir, fileName);
var grunticon = new Grunticon(files, 'dist/icons', options);
grunticon.process(function () {
return deferred.promise;
Copy link

nsierram commented May 10, 2016

Yup, u are right, I had forgotten to put that line ;)

Copy link

aminta commented May 30, 2016

Hi! Great code! Is it possibile integrate it with a .pipe so I can use gulp-svgmin before launch grunticon? Can I concatenate the grunticon.loader.js with other JS files and concatenate the .css files with other Css files?


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment