I just followed http://cloudless.studio/articles/4-installing-font-awesome-from-npm-in-phoenix to add FontAwesome but it doesn’t seem like brunch is copying the fonts.
No route found for GET /fonts/fontawesome-webfont.woff
Some steps to debug this would be appreciated!
When I put
paths.watched it only includes the css files. Seems like a bug in Brunch…
That is because ‘watched’ things only watch for files of which there are plugins for, which is generally just
html (templates). You probably want to add that path as an ‘asset’ directory and that ‘might’ work. What would work fine though is to make a brunch plugin that you can specify font paths into and it can copy the files over to the final static directory. I’ve been writing a few brunch plugins lately so I might be able to do soon (probably weekend) if you remind me enough?
Also do note, the ‘usual’ way of handling fonts is having an npm task (in the package.json file) that copies them from the npm module you depended on into your own work tree directly. That is what I do, although I do not like it, I would prefer a plugin too…
you could try
@OvermindDL1 I also have it inside
conventions.assets as well but it’s not working. Our default
/^(web\/static\/assets)/ works fine though…
Lol, must be a reason for that.
Ah, yeah, that looks like it would work! ^.^
@OvermindDL1 I followed your advice and added
postinstall": "cp -R node_modules/font-awesome/fonts web/static/assets" to npm scripts.
I also opened an issue on github since you can’t even override this changed behavior. https://github.com/brunch/brunch/issues/1514