sapegin / grunt-webfont

SVG to webfont converter for Grunt
MIT License
1.1k stars 210 forks source link

webfont doesn't update Less file #300

Open ansorensen opened 8 years ago

ansorensen commented 8 years ago

I have webfont set up to write Less, with this config:

webfont: {
        icons: {
            src: 'src/common/font/icons/*.svg',
            dest: 'src/common/font/output',
            options: {
                engine: 'node',
                descent: 0,
                normalize: true,
                stylesheet: 'less',
                font: 'eeIcon',
                types: 'eot,woff,ttf,svg',
                templateOptions: {
                    baseClass: 'icon',
                    classPrefix: 'icon-',
                    mixinPrefix: 'icon_'
                }
            }
        }
    }

However, I've noticed that when I add an icon and run grunt webfont, the new icon does not appear in the less. It appears in the HTML output and TTF file, but the Less doesn't get updated. If I manually delete the less file, a new Less file including the icon gets generate.

Since I'm on a Mac, I tried running sudo grunt webfont to see if it might be some weird file permissions issues, but it still won't update an existing Less document.

*Note: the fact that webfont refuses to run again if the icons and the config have not changed made this much more time consuming to debug. Is there a 'force' option?

scottyeck commented 8 years ago

Can you point toward the code? I'm happy to pull down and try to reproduce.