Fonts not copyied to the right place - Solution found / FIX / macOS
It’s getting executed but it does NOT copy the files (fonts). I can run it manually but nothing happens. So, it’s broken… don’t know why. (macOS. Windows not tested.)
I have to do it (copy files) manally to put them in ./src/fonts folder. (The npm, bundler, things does not work here. Maybe on Windows but not on macOS)
How to debug=?
So the problem is with cpy. cpy on a macOS DOES NOT copy the files within the given target directory instead it will take the source directory structure with it. Which is wrong in this case.
"postinstall": "cpy ./node_modules/framework7-icons/fonts/*.* ./src/fonts/ && cpy ./node_modules/material-icons/iconfont/*.* ./src/fonts/"
Solution: FIX: (at least for macOS)
Add --flat for every cpy command. This will put the files in ./src/fonts/ as expected without any sub-folders.
"postinstall": "cpy --flat ./node_modules/framework7-icons/fonts/*.* ./src/fonts/ && cpy --flat ./node_modules/material-icons/iconfont/*.* ./src/fonts/"
After that, you can run:
npm run postinstall
and it will place the required font files in the right place.
Support: I think this needs to be fixed.
% cpy --help --flat Flatten directory structure. All copied files will be put in the same directory.
(I also had to install cpy and cpy-cli manually don’t know why, globally, with -g so that the Terminal command line can find it. Don’t know if this is required to do so but…)
After that, I think the install process should work out-of-the-box also for macOS.