-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert addon to v2, add typescript & glint #239
base: 2.x
Are you sure you want to change the base?
Conversation
test-app/app/app.ts
Outdated
@@ -43,7 +42,6 @@ library.add( | |||
faSync, | |||
faStopwatch20, | |||
faTrashAlt, | |||
faCalendarXmark, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was missing in v2 branch so i did added because it was used in test-app... but in fa5 the icon doesn't exists so there was necessary to remove again
@jrjohnson @robmadole can we get a review? |
It looks great, but I'm not an every day user of the addon anymore. I'll defer review to @robmadole and the FA team. |
@robmadole can we get a review? |
@mkszepp we'll put this on the todo list but it's probably going to be a bit. |
@robmadole okay thanks for feedback... i will look to prepare the docs in next time and adding support for |
@robmadole now all necessary changes / preparations were done |
This PR follows the new ember addon format RFC.
After this PR, the addon is a ember addon v2.
Most of the ember addons were already moved to v2, otherwise they will not anymore work in next gen of ember.
The move to the v2 addon is braking, because the addon is now a real npm package and magically parts of ember were removed. Removing magically parts of ember addons brings the effect that users must configure more things inside there app (like it is with all non ember-addons).
Converting to an v2 addon makes the addon itself easier, costs less maintaince, because the dependencies were reduced to a minium see
In additional we are moving away from broccoli, which is one big goal in ember modern apps.
The move to v2 addon supports like before FA5 & FA6.
Changes
FaIcon
component to addon folder and old test-filed intotest-app
(we don't need anymore the rest)angular
orvue
package of FABraking changes
@fortawesome/fontawesome-svg-core
to peerDependenciesenableExperimentalBuildTimeTransform
which was never documentedwarnIfNoIconsIncluded
as it was used only in build time code (index.js) which doesn't exists in v2 addonsSince now the icons were added as string inside
config/icons.js
. While build time we have search and the specified icons in fontawesome package and imported.Example:
After moving to v2 addon you can import the icons in any point of app (we should document by default in
app.js/ts
and explain that you can do it in every point of app).Example of app.ts
The app must import also the styles directly from font awesome svg package... So we give user the possibility to import the css in any place of app (its possible to add inside a component or in scss file...)
For
fastboot
apps we must teach to useconfig.autoAddCss = false
otherwise the app isnt working.In general we should recommend to import
styles
directly instead of auto DOM add, because it solve the issue that icons have wrong sizes since the css is loaded (the example should be show best practice use) and the behaviour is equal like today.An additional reason to move to v2 addon solves a very long issue. Since now there was always necessary to stop and restart
ember s
when you have added icon, because we have created the file on first build time. With v2 addon you can add it, save changes, app makes a reload and icon is displayed.Open ToDo's
if you like this concept, we can process by updating documentation (btw... in current docs... we speak often only from FA v5 😊) and minimal changes of console.warnings texts inside component
We can add release it for easier deploying... if you want