Skip to content

Add a dedicated Vendor Asset class #40

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Add a dedicated Vendor Asset class #40

wants to merge 13 commits into from

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 dpanta94 and Camwyn 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!

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.

2 participants