User tests: Successful: Unsuccessful:
I want to suggest an idea.
The WebAsset can have a custom class. Actually it already possible, but was not possible while loading assets from json.
Additionally introduce WebAssetAttachBehaviorInterface
, this can be useful when Asset need to have a Script options with a values that depend from environment. Example of old: 'behavior.core', 'behavior.keepalive'.
This also allow to leave in the past old JHtmlBehavior
, at least in the part for loading a scripts.
Look for example
https://github.com/Fedik/joomla-cms/blob/be02eea44e9d5cd4aebbba12d98ec8bacf50ebbd/libraries/src/WebAsset/AssetItem/CoreAssetItem.php#L36-L49
and
https://github.com/Fedik/joomla-cms/blob/be02eea44e9d5cd4aebbba12d98ec8bacf50ebbd/libraries/src/WebAsset/AssetItem/KeepaliveAssetItem.php#L24
ping @wilsonge @dgrammatiko
@mbabker I think it will be cooler than WP_Dependencies no?
run npm install
and
make sure everything works as before.
as part of #22435
Status | New | ⇒ | Pending |
Category | ⇒ | Repository Libraries |
Labels |
Added:
?
?
|
Title |
|
Category | Repository Libraries | ⇒ | Repository NPM Change Libraries |
Labels |
Added:
NPM Resource Changed
?
Removed: J4 Issue ? |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-05-05 13:40:43 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Please can you add docs for this on the web asset docs page
@wilsonge I have added a new chapter https://docs.joomla.org/J4.x:Web_Assets
please check, for my english
Tweaked english. Was really good. Thanks!
It's a YES from me?