-
Notifications
You must be signed in to change notification settings - Fork 66
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
[Theme] [RFC] Strategy about module/theme and asset management #4032
Comments
It might be irrelevant or off topic but... Both composer and yarn/npm are dev tools. Both of them are designed and used to compose/build sources into artifacts, which are then tested and deployed. When build is deployed it should not change. While we (and other cms) want to add additional packages during production which means, we want to recompile stuff in production. At the moment our 3rd party modules are bypasing composer when you install them via web, and this works because PHP is mostly interpreted "on the fly". If someone needs 3rd party php lib in his zikula module there is no way to install it via composer, you have to supply it with the module(which is bad). Even bigger problem is with assets. Webpack (actually npm and yarn) is awesome but it is like composer. The only difference is that it combines all sources into artifacts, which are then being deployed. (I think it will work without being compiled/combined altogether.. maybe? is it even worth checking? it will be huge if not combined and minified)... We do not use proper new age js, our js framework is jQuery... ;) So options:
The problem with building on production is security and size of all those files... so 1, 2, 4 are kind of the same, only the building itself happens in different place.
The only problem with this solution is that we do not have enough resources to pull this off :) Above is not really relevant to what is the issue about, but overall it is, at least in my opinion... |
Closing because this is not our business anymore. |
Background and context
I looked into #3908 and started reading. The problem with this issue is that when you start replacing the component-installer you immediately end at the question how we treat assets and libraries in general.
For the 1st part the component-installer uses
"component-dir": "public"
in ourcomposer.json
file and each component (jquery, jquery-ui, etc.) specifies which assets to process (example).What is missing
Beside the component-installer being deprecated we still have no real asset management nor support for yarn and all this stuff (see #3946). We are also not using Webpack Encore yet (see #3601). Which is of course not easy in a system which consists of several different modules etc. Also we want/need that connected to composer (see #3273, #3438, #3804, Symfony Flex). There are also thoughts about unifying modules and themes (see #3644) and treating them as vendors in future.
Time to look what other's do.
Alternatives
The component-installer readme shows three alternatives:
The third one is the most popular one. But it's new version is incompatible with older ones and became a new project:
How about other projects?
Other PHP projects have similar requirements. Here is some related reading material:
What next
For all these changes we need to agree about the direction we are heading to. Otherwise it is difficult to prioritise things and tackle them one by one.
The text was updated successfully, but these errors were encountered: