-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove CSS & JS from Composer package #116
Comments
Ok so it's confirmed by Laravel-Backpack/CRUD#4008. Add But then... how do we get the CSS & JS assets, upon installation? We need a
git clone |
i love the idea from option 7, i think its the best idea, user still have an option to use cdn or download the packages folder. also will this be released on version 4 or only for the next major release? by the way, my current solution (by not wasting some space) is this: |
Update: we've had a breakthrough here. @promatik has already implemented Option no 7, it's 80% done and it works LIKE FREAKING MAGIC:
We still have a few quirks to work out. But this is very VERY promising. |
We have too many issues open for this, so close this and continue the conversation in Laravel-Backpack/CRUD#4815 |
In short, Backpack 4 has a weight problem... it's gotten to be almost 100MB. But most of that weight is carried inside... the
public/packages
directory:This makes (CONs):
composer install
, but alsocomposer update
even though those new assets won't be published)vendor/..
and insidepublic/..
;But the fact that we have the assets there (PROs):
The trick is... how do we solve the CONs, without eliminating the PROs?
What if... we used
export-ignore
in.gitattributes
to preventpublic/packages
from being included in the ZIP that Composer downloads? Then:backpack/crud
, when installed/updated with Composer, would be just ~4MB;public/packages
some other way; so what we need is aphp artisan backpack:publish-assets
command, that will do just that;That command could:
zip
with just the assets for that particular version, and unzip it;vendor/backpack/crud
, if the use is ok with using NPM;That
zip
could live insidebackpack/crud
(auto-built for each version, also inexport-ignore
of course) or it could be in a mirror repo, that only has those files, not everything else in Backpack (or have everything but the exact reverse - everything else would be inexport-ignore
).This is either a very good idea. Or a very stupid one. Not sure which one it is yet - eager to see if anybody has thoughts on this either way 😀 I just wanted to get it off my chest.
Might also be not needed at all if we decide to use CDNs again (with auto-localized assets).
Food for thought.
The text was updated successfully, but these errors were encountered: