-
-
Notifications
You must be signed in to change notification settings - Fork 171
Reorganize files to make HTML optional. #2002
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
base: main
Are you sure you want to change the base?
Conversation
|
Testing on a fresh 2 fresh apps. This one is an API only app where I've added the Here's a fresh Web app. Both of these are pulling in this branch. Really, it feels almost negligible... at least in development... lastly, just for funsies, here's a release build comparison. full app with HTML api app without HTML |
| class Lucky::Paginator::BulmaNav < Lucky::BaseComponent | ||
| needs pages : Lucky::Paginator | ||
|
|
||
| @[Deprecated("Consider using Lucky::Paginator::SimpleNav or writing a custom component")] |
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.
Is it an idea to put those front-end framework-specific components in a separate shard? Or maybe just document them?
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.
I don't think so. I think just documenting them would be much better. Like recipes if you need. Then adding them into your project is easy and don't have to worry about outdated CSS framework versions.
Purpose
Fixes #1783
Description
No clue if this is a good idea or not 😅 This would be considered a breaking change, but in theory, should be easy to update existing apps....
The idea here is that when you have an API only Lucky app, and have no need for any sort of HTML pages/components, then by removing these files, you should see a (small) performance increase in compilation time.
In my very limited testing, I saw compilation time drop by several seconds. Granted, my app takes well over 2 minutes to compile, so it wasn't much... but I figure in the case of smaller apps, this may be the difference between getting distracted when writing specs, and being productive.
If all works correctly, you would just need to add this for existing apps that need HTML
Checklist
crystal tool format spec src./script/setup./script/test