When using typography.com which is required for certain fonts, you have to add a folder they provide with several files into your fonts folder in assets. However gulp is removing that required sub folder and removing the majority of the files when migrating them to dist/fonts.
These seems related: Gulp tasks remove content from assets/ directory and not sure if there is a best recommended way to deal with this issue or documentation on creating the custom task mention in that thread?
Yes, the dist folder gets wiped whenever you run gulp.
If you’re using a site that requires files, why not just put it in another folder? Place it in assets/fonts or fonts and reference it directly, since it’s a bit of an edge case, no need to over complicate it and try to work it in to the build process. Nothing needs to be built with it anyways.
You’d need to remove .pipe(flatten()) in the gulp.js file to have it work by just dropping it into the fonts folder. @kalenjohnson 's suggestion might be a better option in this case.
Thanks. I’ll just add directly to /dist/fonts/. Didn’t originally since I remember reading the documentation or the Sage book to never put any files in the dist folder directly, but sounds like it won’t hurt anything.
When I added the special numbered folder required by typography.com into /assets/fonts it removed that folder and thus didn’t work, but adding directly to /dist/fonts should do the trick. Thanks!
When you suggest “Place it in assets/fonts” that’s actually where I did place it and where I had the problems mentioned in this thread. When I added the required folder “415586” into assets/fonts, when its gulped it removes that folder 415586 and puts all the files that were inside of it directly into /dist/fonts (rather than /dist/fonts/415586).
Since it sounds like there is no clean built in method for dealing with this, I can do one of the workarounds you mentioned. Thanks!