From f6be97bc5c521530de633153b3e80ac5df7c5c87 Mon Sep 17 00:00:00 2001 From: yoonieaj <144498960+yoonieaj@users.noreply.github.com> Date: Mon, 20 May 2024 16:39:41 -0400 Subject: [PATCH] Update paths in documentation examples (#31) --- CHANGELOG.md | 1 + docs/docs/99-api/examples/automation_demo/automation_demo.js | 2 +- .../examples/automation_demo/more_specific_demos/demo_A.js | 5 +---- .../examples/automation_demo/more_specific_demos/demo_B.js | 5 +---- .../examples/automation_demo/more_specific_demos/demo_C.js | 2 +- .../99-api/examples/blankspaces_demo/blankspaces_demo.js | 2 +- docs/docs/99-api/examples/manual_demo/manual_demo.js | 2 +- docs/docs/99-api/examples/simple_demo/simple_demo.js | 2 +- docs/docs/99-api/examples/style_demo/nostyle_demo.js | 2 +- docs/docs/99-api/examples/style_demo/presets_demo.js | 2 +- docs/docs/99-api/examples/style_demo/style_demo.js | 2 +- memory-viz/package.json | 1 + 12 files changed, 12 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d94ce7e..301efa22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Modified `roughjs` import to be compatible with Jest's `moduleNameMapper` config option. - Added instructions on the `memory-viz/README.md` for running the test suite. - Fix CI build action for demo website. +- Updated file paths for example files under docs to import the correct file. ## [0.1.0] - 2024-04-16 diff --git a/docs/docs/99-api/examples/automation_demo/automation_demo.js b/docs/docs/99-api/examples/automation_demo/automation_demo.js index 8e870286..262b9bcb 100644 --- a/docs/docs/99-api/examples/automation_demo/automation_demo.js +++ b/docs/docs/99-api/examples/automation_demo/automation_demo.js @@ -8,7 +8,7 @@ * */ -const { draw } = require("../../../../../dist/memory_models_rough.js"); +const { draw } = require("memory-viz"); const configuration = { width: 1300, diff --git a/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_A.js b/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_A.js index ed9322ac..040b2aa4 100644 --- a/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_A.js +++ b/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_A.js @@ -6,10 +6,7 @@ * - ~/examples/automation_demo/more_specific_demos/other_objects.svg" */ -const { - MemoryModel, - drawAutomatedOtherItems, -} = require("../../../../../../dist/memory_models_rough.js"); +const { MemoryModel, drawAutomatedOtherItems } = require("memory-viz"); const fs = require("fs"); diff --git a/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_B.js b/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_B.js index ea4387c9..b8e89e36 100644 --- a/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_B.js +++ b/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_B.js @@ -6,10 +6,7 @@ * - ~/examples/automation_demo/more_specific_demos/stack_frames.svg */ -const { - MemoryModel, - drawAutomatedStackFrames, -} = require("../../../../../../dist/memory_models_rough.js"); +const { MemoryModel, drawAutomatedStackFrames } = require("memory-viz"); const WIDTH = 1300; const listOfStackFrames = [ diff --git a/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_C.js b/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_C.js index 85734328..473e9dbe 100644 --- a/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_C.js +++ b/docs/docs/99-api/examples/automation_demo/more_specific_demos/demo_C.js @@ -16,7 +16,7 @@ const { getSize, drawAutomatedOtherItems, MemoryModel, -} = require("../../../../../../dist/memory_models_rough.js"); +} = require("memory-viz"); const fs = require("fs"); const WIDTH = 1300; diff --git a/docs/docs/99-api/examples/blankspaces_demo/blankspaces_demo.js b/docs/docs/99-api/examples/blankspaces_demo/blankspaces_demo.js index f4527461..cffe5fc1 100644 --- a/docs/docs/99-api/examples/blankspaces_demo/blankspaces_demo.js +++ b/docs/docs/99-api/examples/blankspaces_demo/blankspaces_demo.js @@ -15,7 +15,7 @@ * OUTPUT FILE: ~/examples/blankspaces_demo/blankspaces_demo.svg" */ -const { draw } = require("../../../../../dist/memory_models_rough.js"); +const { draw } = require("memory-viz"); const WIDTH = 1300; diff --git a/docs/docs/99-api/examples/manual_demo/manual_demo.js b/docs/docs/99-api/examples/manual_demo/manual_demo.js index 33a954b5..629da1bb 100644 --- a/docs/docs/99-api/examples/manual_demo/manual_demo.js +++ b/docs/docs/99-api/examples/manual_demo/manual_demo.js @@ -6,7 +6,7 @@ * * OUTPUT FILE: ~/examples/manuel_demo/manual_demo.svg */ -const { draw } = require("../../../../../dist/memory_models_rough.js"); +const { draw } = require("memory-viz"); const m = draw( (objects = "./manual_demo.json"), diff --git a/docs/docs/99-api/examples/simple_demo/simple_demo.js b/docs/docs/99-api/examples/simple_demo/simple_demo.js index eb241c29..cae37d58 100644 --- a/docs/docs/99-api/examples/simple_demo/simple_demo.js +++ b/docs/docs/99-api/examples/simple_demo/simple_demo.js @@ -5,7 +5,7 @@ * */ -const { draw } = require("../../../../../dist/memory_models_rough.js"); +const { draw } = require("memory-viz"); const objects = [ { diff --git a/docs/docs/99-api/examples/style_demo/nostyle_demo.js b/docs/docs/99-api/examples/style_demo/nostyle_demo.js index dece8fd8..bd5a5ed4 100644 --- a/docs/docs/99-api/examples/style_demo/nostyle_demo.js +++ b/docs/docs/99-api/examples/style_demo/nostyle_demo.js @@ -7,7 +7,7 @@ * - ~/docs/examples/style_demo/nostyle_demo.svg */ -const { draw } = require("../../../../../dist/memory_models_rough.js"); +const { draw } = require("memory-viz"); const configuration = { width: 1300, diff --git a/docs/docs/99-api/examples/style_demo/presets_demo.js b/docs/docs/99-api/examples/style_demo/presets_demo.js index 7453f0ca..5c6e94f7 100644 --- a/docs/docs/99-api/examples/style_demo/presets_demo.js +++ b/docs/docs/99-api/examples/style_demo/presets_demo.js @@ -6,7 +6,7 @@ * OUTPUT FILE: ~/examples/style_demo/presets_demo.svg" */ -const { draw } = require("../../../../../dist/memory_models_rough.node"); +const { draw } = require("memory-viz"); const WIDTH = 1300; diff --git a/docs/docs/99-api/examples/style_demo/style_demo.js b/docs/docs/99-api/examples/style_demo/style_demo.js index df297ea1..9a51afef 100644 --- a/docs/docs/99-api/examples/style_demo/style_demo.js +++ b/docs/docs/99-api/examples/style_demo/style_demo.js @@ -14,7 +14,7 @@ * - ~/examples/style_demo/style_demo.svg" */ -const { draw } = require("../../../../../dist/memory_models_rough.js"); +const { draw } = require("memory-viz"); const configuration = { width: 1300, diff --git a/memory-viz/package.json b/memory-viz/package.json index aef0e56e..6f6d6506 100644 --- a/memory-viz/package.json +++ b/memory-viz/package.json @@ -22,6 +22,7 @@ }, "contributors": [ "Mimis Chlympatsos", + "Yoonie Jang", "Shannon Komguem", "Utku Egemen Umut", "Ziyuan (Jerry) Zhang"