@commversion/libs
v0.18.11
Published
A set of Commversion's public facing scripts and utilities.
Downloads
1,289
Readme
Commversion public facing libraries
A set of Commversion's public facing scripts and utilities.
Installation & Configuration
The library is distributed as a public facing npm package.
The recommended way to install this on a website is through JsDelivr.com.
<script src="https://cdn.jsdelivr.net/npm/@commversion/libs@version/dist/schedule-event.js"></script>Configuration
Configuration takes place by global window.commversion object, make sure to not overwrite it if it already exists!
<script>
window.commversion = window.commversion || {};
window.commversion.someProperty = true;
</script>Available scripts
All scripts are available under the scripts/ directory.
- schedule-event
- lc-attribution
- lc-open-on-button-click
- lc-cookie-banner-update-position
- lc-show-by-selector
- lc-exit-intent-debounced
- lc-pause-on-url
- lc-kill-chat-persist
- lc-gclid
- lc-powered-by
- lc-ga-initialize-event
- lc-exit-intent
- lc-ga-tags
- lc-input-errors
- lc-show-hide
- lc-kill-chat
- lc-form-abandonment
- lc-form-submission
- lc-experiment
- lc-gtm
- lc-device
- lc-geoblocking
- lc-utm-params
- lc-whatsapp-widget-only
- lc-whatsapp-widget-combo
- lc-channel-widgets
- lc-privacy-notice
Release new versions
Important
This project uses the npm.js public registry. Before trying to do any release, make sure you are logged with npm as Commversion.
The quickest way to do that, is to create a .npmrc file in the project directly and insert the following:
//registry.npmjs.org/:_authToken=base64_encoded_npm_tokenYou can test if the above works by running:
$ pnpm whoami
commversion # this is the authenticated npm userThe project follows the semantic versioning convention.
Patch releases for bug fixes. Minor releases for new features. Major releases for breaking changes.
The release is fully automated by executing pnpm run release. No need to run build scripts beforehand, this is done automatically.
Guideline for contributing
This project uses pnpm via Corepack — the exact pnpm version is pinned in packageManager in package.json and Corepack downloads/verifies it on first use. Enable Corepack once with:
corepack enableNode >=24 is required.
To create a new script, run the following command in a shell.
pnpm new script-nameThe command above will create a new script containing the absolute minimum files. It will also amend root README.md and package.json to include required entries.
Start working on a specific script by running pnpm run dev:<script-name>.
Finally, you can run tests by running:
pnpm test