Skip to content

Commit

Permalink
fix: scales.html not loading in production (#237)
Browse files Browse the repository at this point in the history
* fix: scales.html not loading in production, closes #236
  • Loading branch information
karstens authored Mar 21, 2024
1 parent f98a273 commit b5dbb3d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-starfishes-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@adobe/leonardo-ui": patch
---

* Fix scales.html not loading in production
5 changes: 3 additions & 2 deletions docs/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To get started developing Leonardo's UI:
pnpm install

# Run local server
pnpm dev
pnpm moon run dev
```

Then, visit the live reloading web UIs here:
Expand All @@ -28,7 +28,7 @@ http://localhost:1234/tools.html

### Cross-package development

When making updates to `@adobe/leonardo-contrast-colors` while also developing the user interface, some issues may occur while linking the local dependency.
When making updates to `@adobe/leonardo-contrast-colors` while also developing the user interface, some issues may occur while linking the local dependency.
Follow these steps **every time you install or update an npm dependency**:

1. Install your new dependency
Expand All @@ -41,6 +41,7 @@ pnpm add my-new-package

```
rm -rf <leonardo-root>/.parcel-cache
rm -rf <leonardo-root>/.moon/cache
```

3. Link local Leonardo
Expand Down
1 change: 1 addition & 0 deletions docs/ui/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ tasks:
- parcel
- build
- --no-optimize
- --no-cache
- src/index.html
- src/scales.html
- src/tools.html
Expand Down
2 changes: 1 addition & 1 deletion docs/ui/src/js/createHtmlElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function createSvgElement({element, id, className, attributes, styles, textConte
const svgns = 'http://www.w3.org/2000/svg';
const el = document.createElementNS(svgns, element);
if (id) el.id = id;
if (className) el.className = className;
if (className) el.setAttribute('class', className);
if (styles) {
for (const [prop, value] of Object.entries(styles)) {
el.style[prop] = value;
Expand Down

0 comments on commit b5dbb3d

Please sign in to comment.