- Injects a floating iframe with the adauris widget into the page
- Develop code in floating-iframe-injector.js
- Test Script using temp.html
- Recommend using the Live Server Extension for fatest development here
- When code is ready, run the script "minify" for cdn/npm distribution
- use =>
npm install -g uglify-js
for the script command to work
- use =>
- Commit and push the code to the main repo ✅
- Ensure to Build and bundle your code ✅
- via the script command in the npm package
- Prepare for deployment with np: ✅
- Run np in your project directory.
- You will need to install =>
npm install -g [np](https://www.npmjs.com/package/np)
- np will guide you through a series of prompts to publish your package on npm.
- Make sure to specify the correct version number when prompted.
- The ad auris org on NPM is https://www.npmjs.com/org/ad-auris
- Set up CDN deployment: ✅
- Configure the CDN resource to point to your GitHub repository or directly to the bundled JavaScript file.
- We use => https://www.jsdelivr.com - This is free & open soruce and will work out of the box once the npm package is published
- Test 🧪 the deployment ✅
- Access the CDN URL similar to https://cdn.jsdelivr.net/npm/your-package-name@latest/your-script.js in a web browser or include it in your HTML file.
- V1 of the iframe is this URL https://cdn.jsdelivr.net/npm/ad-auris-iframe-distribution@latest/script.js (remember do not share this with publications as this is legacy)
- Verify that the bundled JavaScript file is being served correctly from the CDN.
If you want to test the full distribution flow please follow these instructions: https://adauris.atlassian.net/wiki/spaces/AA/pages/154796046/WordPress+Self-Help+Sheet