1.0.4 • Published 2 years ago

@criclabs/galderma-web v1.0.4

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Galderma Web

Usage

  1. Include following script tag to page head in the site setting or specific page.
  2. Update version of the module.
<script
  defer
  src="https://cdn.jsdelivr.net/npm/@criclabs/galderma-web@{version}/dist/galderma-web.js"
></script>
  1. On the Webflow page, initialize the component in the head section.
<script>
  window.addEventListener("DOMContentLoaded", () => {
    const buttonElement = document.querySelector("#unique-button");

    if (buttonElement) {
      new GaldermaWeb.Button(buttonElement);
    }
  });
</script>

Local Development

The following instructions for setting up a local development environment allow you to develop the web component locally and see the changes you make reflected on the Webflow site.

Prerequisites

  1. Install ngrok on your local machine.
  2. Sign in to ngrok and configure your authentication token on your machine.
ngrok config add-authtoken YOUR-AUTH-TOKRN

Setup Local Development

  1. Run the ngrok's file server with following command:
ngrok http file://$PWD
  1. Get the public URL from the ngrok console and visit the URL from your browser then click on "Visit Site".
  2. On the WebFlow's custom code setting, comment out the script tag of the original module and add the module you are working on.
<!-- <script defer src="ORIGINAL_MODULE_URL"></script> -->
<script defer src="NGROK_PUBLIC_URL/dist/galderma-web.js"></script>
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.0

2 years ago