gleero / grunt-favicons

Generate favicon.ico and icons for iOS, Android and WP8
MIT License
232 stars 48 forks source link

Перезапись HTML output файла #5

Closed dakiesse closed 10 years ago

dakiesse commented 10 years ago

Если уже сформирован html файл (результат параметра options.html), то при следующем выполнение таски, файл не перезаписывается (например у options.HTMLPrefix поменяли значение).

TheSeg commented 10 years ago

I'm having the same problem (used Google Translate).

When using options.HTML and options.HTMLPrefix, then change the HTMLPrefix, the HTML file is not modified at all.

Workarounds:

gleero commented 10 years ago

Now the task on startup removes all possible icons tags.

...
favicons: {
    stage1: {
        options: {
            html: 'test/out/test.html',
            HTMLPrefix: "/images/set1/",
        },
        src: 'test/test.png',
        dest: 'test/out'
    },
    stage2: {
        options: {
            html: 'test/out/test.html',
            HTMLPrefix: "/images/set2/",
        },
        src: 'test/test.png',
        dest: 'test/out'
    }
}
...

grunt.registerTask('default', ['favicons:stage1', 'favicons:stage2']);

stage2 will remove from html all icons created in stage1. If I understand the problem.