Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to : update fontawesome with bower

I can see on FontAwesome GitHub that a new version 4.2 has been release

I use bower 1.3.9 (latest), and my current version of font awesome is 4.1

When I type bower update fontawesome or bower update fontawesome#4.2 I can't get the 4.2.

Is there a way to update font awesome to 4.2 with bower ?

Into the bower.json of fontawesome bower components directory, I can see this git url git://github.com/FortAwesome/Font-Awesome.git which is slightly the same as https://github.com/FortAwesome/Font-Awesome.git where the latest version is available.

Any help would be appreciated

like image 650
Dimitri Kopriwa Avatar asked Aug 26 '14 23:08

Dimitri Kopriwa


People also ask

How do I import Fortawesome Font Awesome for free?

OR you can import the module in your js code. import '@fortawesome/fontawesome-free/js/all. js'; OR if you are using Sass, you can import the module in app.


2 Answers

I have edited my bower.json file and replaced the line:

"fontawesome": "~4.1.0",

with:

"fontawesome": "https://github.com/FortAwesome/Font-Awesome.git#~4.2.0"

Finally, I did bower install fontawesome --save.

It finally updated font awesome.

bower cached        https://github.com/FortAwesome/Font-Awesome.git#4.2.0
bower validate      4.2.0 against https://github.com/FortAwesome/Font-Awesome.git#~4.2.0
bower cached        git://github.com/FortAwesome/Font-Awesome.git#4.1.0
bower validate      4.1.0 against git://github.com/FortAwesome/Font-Awesome.git#*
bower new           version for git://github.com/FortAwesome/Font-Awesome.git#*
bower resolve       git://github.com/FortAwesome/Font-Awesome.git#*
bower download      https://github.com/FortAwesome/Font-Awesome/archive/v4.2.0.tar.gz
bower extract       fontawesome#* archive.tar.gz
bower resolved      git://github.com/FortAwesome/Font-Awesome.git#4.2.0
bower install       fontawesome#4.2.0

I have reopened my bower.json, my line has been replaced by:

"fontawesome": "~4.2.0",

Hope it helps.

like image 105
Dimitri Kopriwa Avatar answered Oct 13 '22 10:10

Dimitri Kopriwa


I think you can also simply run:

/var/shared/bower> bower install font-awesome#4.3.0 --save
font-awesome#4.3.0 bower_components/font-awesome

It will replace the current font-awesome version with the new one. ( it won't create a new dir )

like image 41
Ricky Levi Avatar answered Oct 13 '22 09:10

Ricky Levi