gulp = require 'gulp' config = require('../../config').fontIcons template = require 'gulp-swig' rename = require 'gulp-rename' module.exports = (codepoints, options) -> iconSass = template(data: icons: codepoints.map((icon) -> { name: icon.name code: icon.codepoint.toString(16) } ) fontName: config.options.fontName fontPath: config.fontPath className: config.className comment: 'DO NOT EDIT DIRECTLY!\n Generated by ./gulp/tasks/fontIcons/ge' + 'nerateIconSass.coffee\n from ' + config.template) gulp.src(config.template) .pipe iconSass .pipe rename(config.sassOutputName) .pipe gulp.dest(config.sassDest)