[Helpful Hint] make:addon artisan command for theme has issues - use with caution
emergingdzns - 4 months ago
I've been putting together a few themes for client sites and I keep running into issues and I finally have a moment to write this all down. This is all hopefully to save other devs time in the future when creating new themes.
To get started on a new theme, I would typically run
php artisan make:addon and give it my namespace.theme.name string. It then creates a very odd skeleton of a theme which I think is probably a bit out-dated.
Secondly, the scss is REALLY slow. So slow my browser times out. I can't just load the home page with nothing on it even. It's a dog. I totally understand WHY this is being used and that it can be very handy but so far it has just proven to be a major pain in the butt. If you remove the ["live"] or ["min"] from the script inline function and it speeds up dramatically. Far better to simply configure your bootstrap elements in a non-minified bootstrap file and put them in a regular css folder and include them in the page.
Last, it seems like there's an odd version dichotomy here too because the skeleton of the theme that is created uses a very old version of jquery, and the older bootstrap 3.3.7. But then if you attempt to do pagination in any theme or module files, the pagination twig that is used comes from the accelerant theme and is bootstrap 4 based.
So, my latest strategy now is to use the artisan command to scaffold it up but then I remove most all of the files from the resources folder and plug in my own, newer ones. The views I'll keep but modify to my needs and new files.