2.0.13 • Published 10 months ago

@wized/embed v2.0.13

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

Wized Embed

This repsotory contains the client embed code for Wized 2.0.

File overview

src/index.ts - the entry point of the to-be-embedded script.

How to run this project

  1. Make sure you have pnpm installed in your machine. Run npm i -g pnpm to install it globally.
  2. Run pnpm install.
  3. Run pnpm dev.

Linting

To lint the project, run pnpm lint. To fix all the auto-fixable linting issues, run pnpm lint:fix.

CD

The Wized Embed is continuously deployed to npm via Changesets.

Changesets does the following automatically for us:

  • Generates a changelog that documents all the deployed updates.
  • Manages the package's SemVer.
  • Publishes new versions to npm.

New versions of the package are defined via:

pnpm changeset

This command will trigger a CLI questionnaire asking for the type of changes and a summary describing them. Once you're done, it will create a Changeset file in the .changesets/ folder.

What's most important is the next step. The Changesets workflow is triggered when pushing a commit to the main or staging branches.

  • Committing a changeset to the staging branch will trigger a beta release workflow.
  • Committing a changeset to the main branch will trigger a production release workflow.

Once the workflow starts, Changesets will scan the project for all changeset files and automatically open a new Pull Request that:

  • Bumps the package version number based on the type of changes.
  • Updates the CHANGELOG.md file with the changeset info.
  • Removes the previously generated changeset files.

Merging this Pull Request will finalize the workflow by deploying the new version to npm.

Importing the Wized Embed via jsDelivr

Staging

For beta releases, the Wized Embed can be imported either with a version range like:

https://cdn.jsdelivr.net/npm/@wized/embed@beta/embed.js

Or with a specific version like:

https://cdn.jsdelivr.net/npm/@wized/embed@1.1.0-beta-20230227192721/embed.js

Production

For production releases, the Wized Embed can be imported either with a version range like:

https://cdn.jsdelivr.net/npm/@wized/embed@1/embed.js

Or with a specific version like:

https://cdn.jsdelivr.net/npm/@wized/embed@1.1.0/embed.js

Purging CDN cache

Version range URLs have a 7 day maxAge cache. Meaning that imports like https://cdn.jsdelivr.net/npm/@wized/embed@beta/embed.js will display the same content for 7 days before the cache is invalidated. If you need to manually purge the cache you just have to visit the same URL but replacing the subdomain for purge:

https://purge.jsdelivr.net/npm/@wized/embed@beta/embed.js
2.0.3

10 months ago

2.0.2

10 months ago

2.0.13

10 months ago

2.0.5

10 months ago

2.0.4

10 months ago

2.0.11

10 months ago

2.0.7

10 months ago

2.0.12

10 months ago

2.0.6

10 months ago

2.0.9

10 months ago

2.0.10

10 months ago

2.0.8

10 months ago

2.0.1

10 months ago

2.0.0

10 months ago

0.1.0

1 year ago

0.0.0

1 year ago