From 545162eaae43f3c80b57575b7444a6bee91f323a Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 28 Nov 2023 14:19:08 -0500 Subject: [PATCH] data-web-awesome instead of data-webawesome --- docs/pages/getting-started/installation.md | 6 +++--- docs/pages/resources/changelog.md | 2 +- src/utilities/base-path.ts | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pages/getting-started/installation.md b/docs/pages/getting-started/installation.md index 9d2aceb10..02199b2d7 100644 --- a/docs/pages/getting-started/installation.md +++ b/docs/pages/getting-started/installation.md @@ -100,8 +100,8 @@ Some components rely on assets (icons, images, etc.) and Web Awesome needs to kn However, if you're [cherry picking](#cherry-picking) or [bundling](#bundling) Web Awesome, you'll need to set the base path. You can do this one of two ways. ```html - - + + @@ -144,7 +144,7 @@ Here's an example that loads only the button component. Again, if you're not usi ```html - + * * * Alternatively, you can set the base path manually using the exported setBasePath() function. * @@ -23,11 +23,11 @@ export function setBasePath(path: string) { export function getBasePath(subpath = '') { if (!basePath) { const scripts = [...document.getElementsByTagName('script')] as HTMLScriptElement[]; - const configScript = scripts.find(script => script.hasAttribute('data-webawesome')); + const configScript = scripts.find(script => script.hasAttribute('data-web-awesome')); if (configScript) { - // Use the data-webawesome attribute - setBasePath(configScript.getAttribute('data-webawesome')!); + // Use the data-web-awesome attribute + setBasePath(configScript.getAttribute('data-web-awesome')!); } else { const fallbackScript = scripts.find(s => { return /webawesome(\.min)?\.js($|\?)/.test(s.src) || /autoloader(\.min)?\.js($|\?)/.test(s.src);