Closed rkingon closed 7 years ago
I'm seeing this also. Would be great to have a config for output path, with a default for the options.fonts directory passed in.
I'm in progress learning grunt, so in the meantime, here is a straightforward fix for it post-build (we are building to .tmp/fontello-build and only moving out one file):
grunt.config.set('shell', {
/**
* After fontello CSS and font are built (see config/fontello.js),
* perform stream edit search & replace (../font/ -> /styles/fonts/) and output
* to a .less file (which is just CSS) for inclusion.
*/
fontelloFileOperations: {
command: [
'sed "s!\.\.\/font\/!/styles/fonts/!g" .tmp/fontello-build/myfont-embedded.css > assets/styles/font-myfont.css'
'rm -rf .tmp/fontello-build/'
].join('&&')
}
});
grunt.loadNpmTasks('grunt-shell');
Resolved with #12
Hi, we found that the path within the generated CSS file is always the same:
../font/[font-name]
If the font generated path is changed via
fonts
property on the Grunt config it's not being used, leading to a 404 if not manually updated.Thanks for looking into this!