Zephr User Guide

Import Module Using NPM

22 views 0

To install the Zephr module, run the following command in a terminal:

npm install --save @zephr/browser

The tool is packaged as both UMD and ES6 modules.

You must import the zephrBrowser object and run the script as follows:

import * as zephrBrowser from 'zephr-browser.modern.js';

document.addEventListener('DOMContentLoaded', (event) => {

In the code above, set the baseUrl variable to the default site URL from the site configuration stage; for example, https://v4-demo-chris-my-site.cdn.demo.zephr.com.