FortAwesome / ember-fontawesome

Font Awesome Ember component using SVG with JS
https://fontawesome.com
MIT License
119 stars 49 forks source link

Kit support #195

Open st-h opened 2 years ago

st-h commented 2 years ago

Is your feature request related to a problem? Please describe. The font awesome website proposes to make use of Kits when getting started: https://fontawesome.com/v6.0/docs/web/setup/quick-start However, it seems this feature is not supported by this addon.

Describe the solution you'd like It is possible to specify the kit url at build time and the addon pulls the necessary icons from this url. Please note that a Kit may include customised icons, that are not present in the npm libraries.

Describe alternatives you've considered I've added custom icons (svg markup) to templates directly instead of making use of this addon.

gzurbach commented 2 months ago

FYI - I was able to use a Kit with the following approach...

First, install the kit:

npm install --save-dev '@awesome.me/kit-1234567890@latest'

Then, add this to ember-cli-build.js:

app.import('node_modules/@awesome.me/kit-1234567890/icons/js/all.js');

Finally, delete the icons.js file and add this to environment.js:

fontawesome: {
  warnIfNoIconsIncluded: false,
},

Icons can be used via the <FaIcon> component, as before.

Hope this helps!

mkszepp commented 1 month ago

I didn't used and tested.. but my PR for moving addon to an v2 could resolve your workarounds see https://github.com/FortAwesome/ember-fontawesome/pull/239