Skip to content
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

Feature/initable exports #15

Merged
merged 16 commits into from
Jun 20, 2024
Merged

Feature/initable exports #15

merged 16 commits into from
Jun 20, 2024

Conversation

gwleuverink
Copy link
Owner

@gwleuverink gwleuverink commented May 31, 2024

This PR adds the ability make imports invokable by passing a init prop to the x-import component.

This will instruct the bundle to immediately invoke the default exported function in a local module. Note that the default export needs to be a function in order to work.

// resources/example.js

export default () => {
    alert(‘Hello World!)
}
<x-import module=“~/example” init />

This can be useful when bootstrapping libraries and will replace the IIFE method as the recommended way to bootstrap

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

Copy link

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.58%. Comparing base (c25d8b7) to head (78e4bcb).
Report is 1 commits behind head on main.

Current head 78e4bcb differs from pull request most recent head 347b35e

Please upload reports for the commit 347b35e to get more accurate results.

Files Patch % Lines
src/BundleManager.php 92.85% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #15      +/-   ##
============================================
- Coverage     97.82%   97.58%   -0.24%     
- Complexity       55       57       +2     
============================================
  Files             8        8              
  Lines           276      290      +14     
============================================
+ Hits            270      283      +13     
- Misses            6        7       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

  • Declining Code Health: 3 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

  • Declining Code Health: 3 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

  • Declining Code Health: 3 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

View detailed results in CodeScene

@gwleuverink gwleuverink marked this pull request as ready for review June 20, 2024 15:32
@gwleuverink gwleuverink merged commit de30d2b into main Jun 20, 2024
22 checks passed
@gwleuverink gwleuverink deleted the feature/initable-exports branch August 25, 2024 00:57
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.

1 participant