Upgrade process for fontawesome from 4 to 5

被刻印的时光 ゝ 提交于 2019-12-03 22:21:58

It's not backwards compatible.

I just publish a script to do the migration from 4 to 5 in:

https://github.com/estebandelaf/scripts/blob/master/fontawesome4to5.sh

PS: I know the post is from a year ago, but is the second result in google for "fontawesome migration script 4 to 5".

Since above mentioned scripts doesn't work for icons like thermometer,battery etc. Created a python script that works for all icons. Below is the link.

https://github.com/abkcode/fontawesome4to5

For details about the upgrade changes visit.

https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4

Fontawesome provides v4-shiv.js that transitions old v4 icons into v5 but it's only for the SVG+JS framework.

If you are using the CSS framework with webfonts, here is a jQuery javascript that does the same thing.

https://gist.github.com/timint/fb53929ff196d0a5754188bd93a80cef

I have created a python script to upgrade from 4.7 to 5.1 without the need to. It worked best for me. https://gist.github.com/ilanben/38ef4d4545cb74089375af0ceecf439b

Update: Fixed the link which was temporarily broken

javad rhmi

Simply use use.fontawesome.com/releases/v5.10.1/css/v4-shims.css

More details : https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!