laravel-splade
laravel-splade copied to clipboard
Publish on npm, or provide packed JS build with composer?
If you're updating Splade, you must update with composer and npm. Does it make sense to provide a packed JS build with the composer package and import that into the main app JS file, or provide an Artisan command that can publish/update it? It doesn't feel very 'pure', but I can see people updating just either composer or npm and ending up with different versions of the JS and PHP package.
Yeah, That is a really good concern.
I think the best approach is that we can do it the way Laravel Nova ships their updates. They include the bundled JS build which you can simply publish with an artisan command (like php artisan splade:publish
)
As splade isn't closed source you could still optionally provide the JavaScript source code for people wanting to mess with the uncompiled source files.
After working with it for a few months, I think the current setup works fine. I've added an Artisan Command (splade:show-versions
) to help identify the installed version.