Skip to content

Conversation

@JPry
Copy link
Contributor

@JPry JPry commented Apr 14, 2025

This adds the VendorAsset class for use with vendor scripts. The specific uses case is when handling a 3rd-party asset and registering a CDN URL for the asset instead of a local URL.

Notable changes:

  1. Creates the VendorAsset class as an extension of the Asset class.
  2. Adds a wpunit test suite to test various aspects of VendorAsset.
  3. Makes some minor tweaks to docblocks in the main Asset class.

@JPry JPry self-assigned this Apr 14, 2025
@JPry JPry force-pushed the feature/vendor-asset branch from 574f9f8 to 113fc17 Compare April 14, 2025 23:24
@JPry JPry requested review from Camwyn and dpanta94 April 15, 2025 00:49
Copy link
Member

@dpanta94 dpanta94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the minor syntax comment - i like the work.

Going to ask @borkweb to take a look as well when he can before we merge though!

@dpanta94 dpanta94 requested a review from borkweb April 15, 2025 14:22
Copy link
Member

@dpanta94 dpanta94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just though that we would need to change the static method

Asset::add - to add a new static and not a new self!

Copy link
Contributor

@Camwyn Camwyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some docblock tweaks.
Overall looks good.
Agree with Dimi on the new static

@JPry JPry requested a review from Camwyn April 21, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants