Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return fs.statSync(path).isFile();
}
catch (err) {
return false;
}
};
if (src.length > 1 && !isFile(src[src.length - 1])) {
dest = src[src.length - 1];
src.pop();
}
// start fontmin
new Fontmin()
.src(src)
.use(Fontmin.svgs2ttf(fmOpts.fontFamily, fmOpts))
.use(Fontmin.ttf2eot(fmOpts))
.use(Fontmin.ttf2woff(fmOpts))
.use(Fontmin.ttf2svg(fmOpts))
.use(Fontmin.css(fmOpts))
.use(dump(fmOpts))
.dest(dest || 'output')
.run((err, files, stream) => {
if (err) {
log(err);
process.exit(1);
}
files.forEach(file => {
log(`created: ${file.path}`);
});