thomasloven / hass-fontawesome

🔹 Use icons from fontawesome in home-assistant
Other
287 stars 54 forks source link

Pro without active NPM registry access #24

Closed lizaoreo closed 4 years ago

lizaoreo commented 4 years ago

Is there anyway we could get a guide or script for patching pro icons without an active subscription to Font Awesome? I have Pro 5 access, but I can't access the NPM registry to update the icon files. I can download the copies of what's in the registry through the download page though, so if there's a way I can point the patch script to that it would be great.

lizaoreo commented 4 years ago

Ah, I worked it out. Installed the free one and then mimic'd what it did. For anyone else with this issue, this is what I did. Go to the Font Awesome download portal while logged in, download the npm pro package which contains everything.

image

Then run the git clone and go into the hass-fontawesome directory as directed in step 2 (you don't need step 1). I downloaded the fontawesome-pro.patch edit from @Robvred here: https://github.com/thomasloven/hass-fontawesome/issues/18#issuecomment-631439264.

Run that edited pro patch. At this point, I created a node_modules folder and in it I created a @fortawesome folder. In that folder I placed the package folder from the downloaded font-awesome pro npm package (extracted from the archive). Rename that folder from package to fontawesome-pro. Directory structure should look like this "/home/user/hass-fontawesome/node_modules/@fortawesome/fontawesome-pro":

image

After this you can run the npm install etc... command and it will build out and you can follow the rest of the guide as directed.

$ git clone https://github.com/thomasloven/hass-fontawesome $ cd hass-fontawesome/ $ git apply < fontawesome-pro.patch $ npm install && npm run-script build