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

feat: Add IIFE bundle for single script include #478

Merged
merged 3 commits into from
Aug 7, 2024
Merged

Conversation

BYK
Copy link
Member

@BYK BYK commented Aug 6, 2024

This change adds an Immediately Invoked Function Expression (IIFE) bundle which automatically initializes Spotlight upon loading. Greatly simplifies the HTML include method for Spotlight.

It also fixes a bug where Spotlight won't be initialized if it loads after page load event and injectImmediately was not set to true.

This change adds an Immediately Invoked Function Expression (IIFE) bundle which automatically initializes Spotlight upon loading. Greatly simplifies the HTML include method for Spotlight.

It also fixes a bug where Spotlight won't be initialized if it loads after page `load` event and `injectImmediately` was not set to `true`.
@BYK BYK requested review from Lms24 and dcramer August 6, 2024 20:33
Copy link

vercel bot commented Aug 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spotlightjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2024 8:41pm

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Looks fine to me from a technical perspective!

@BYK BYK merged commit 12ac07d into main Aug 7, 2024
13 checks passed
@BYK BYK deleted the byk/feat/auto-run-script branch August 7, 2024 14:16
BYK pushed a commit that referenced this pull request Aug 7, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @spotlightjs/overlay@2.3.0

### Minor Changes

-   Add IIFE for auto load & init over CDN with a single script include
    ([#478](#478))

### Patch Changes

-   Overhaul React code for multiple fixes and performance improvements
    ([#473](#473))

- Various improvements in React code for better stability & performance
    ([#476](#476))

## @spotlightjs/astro@2.1.6

### Patch Changes

- Various improvements in React code for better stability & performance
    ([#476](#476))

-   Updated dependencies

\[[`d38c054a47820fe074ad3fd61fe5960e85e0ef49`](d38c054),

[`8f42d4e6b97d3503c36447c0ba6ffa1ebea72ccf`](8f42d4e)]:
    -   @spotlightjs/spotlight@2.3.1

## @spotlightjs/electron@1.1.4

### Patch Changes

-   Overhaul React code for multiple fixes and performance improvements
    ([#473](#473))

- Various improvements in React code for better stability & performance
    ([#476](#476))

-   Updated dependencies

\[[`d38c054a47820fe074ad3fd61fe5960e85e0ef49`](d38c054),

[`12ac07d7e270a48fee308e6d89495417bc06f943`](12ac07d),

[`8f42d4e6b97d3503c36447c0ba6ffa1ebea72ccf`](8f42d4e)]:
    -   @spotlightjs/overlay@2.3.0

## @spotlightjs/spotlight@2.3.1

### Patch Changes

-   Overhaul React code for multiple fixes and performance improvements
    ([#473](#473))

- Various improvements in React code for better stability & performance
    ([#476](#476))

-   Updated dependencies

\[[`d38c054a47820fe074ad3fd61fe5960e85e0ef49`](d38c054),

[`12ac07d7e270a48fee308e6d89495417bc06f943`](12ac07d),

[`8f42d4e6b97d3503c36447c0ba6ffa1ebea72ccf`](8f42d4e)]:
    -   @spotlightjs/overlay@2.3.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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