From d864c9d6af198f74f2edad41e4d473b035a35ee8 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 11 Dec 2024 17:14:22 -0500 Subject: [PATCH 1/4] Update replacement line for WWT namespace in main app file. --- scripts/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index bc0dad7..90dac88 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -30,7 +30,7 @@ title=$(space_split_pascal ${pascal_case_name}) cd src sed -i.bak "s/MainComponent/${pascal_case_name}/g" main.ts sed -i.bak "s/MainComponent/${pascal_case_name}/g" MainComponent.vue -sed -i.bak "s/wwt-minids-template/$name/g" main.ts +sed -i.bak "s/vue-ds-template/$name/g" main.ts rm -f main.ts.bak mv MainComponent.vue ${pascal_case_name}.vue From 21d64d0d10ce9a1d02d20c562f027c88307044c0 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 11 Dec 2024 17:15:49 -0500 Subject: [PATCH 2/4] Make WWT namespace consistent between component and app. --- scripts/setup.sh | 1 + src/MainComponent.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 90dac88..4bdb1d6 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -31,6 +31,7 @@ cd src sed -i.bak "s/MainComponent/${pascal_case_name}/g" main.ts sed -i.bak "s/MainComponent/${pascal_case_name}/g" MainComponent.vue sed -i.bak "s/vue-ds-template/$name/g" main.ts +sed -i.bak "s/vue-ds-template/$name/g" MainComponent.vue rm -f main.ts.bak mv MainComponent.vue ${pascal_case_name}.vue diff --git a/src/MainComponent.vue b/src/MainComponent.vue index 9d5a93d..0d37c54 100644 --- a/src/MainComponent.vue +++ b/src/MainComponent.vue @@ -257,7 +257,7 @@ const touchscreen = supportsTouchscreen(); const { smAndDown } = useDisplay(); const props = withDefaults(defineProps(), { - wwtNamespace: "MainComponent", + wwtNamespace: "vue-ds-template", initialCameraParams: () => { return { raRad: 0, From 80dfd326a3461fed9ccd4f62dd94b9f3d0df9f47 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 11 Dec 2024 17:16:14 -0500 Subject: [PATCH 3/4] Remove now-unneeded command. --- scripts/setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 4bdb1d6..c8b4fe2 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -36,7 +36,6 @@ rm -f main.ts.bak mv MainComponent.vue ${pascal_case_name}.vue cd ../public -sed -i.bak "s/minids-template/$name/g" index.html sed -i.bak "s/CosmicDS data story template/$pascal_case_name/g" index.html sed -i.bak "s/CosmicDS Vue template/$title/g" index.html sed -i.bak "s/CosmicDS Vue Template/$title/g" index.html From d07942cd05d81965acde4b4b50858469e560418f Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 11 Dec 2024 17:17:27 -0500 Subject: [PATCH 4/4] Fix error message in name update script. --- scripts/update-name.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update-name.js b/scripts/update-name.js index 4a5b340..954b547 100644 --- a/scripts/update-name.js +++ b/scripts/update-name.js @@ -3,11 +3,11 @@ const { updatePackageData } = require("./utils"); const name = argv[2]; if (!name) { - console.error("Missing name of new mini!"); + console.error("Missing name of new story!"); exit(1); } updatePackageData((data) => { data.name = name; return data; -}); \ No newline at end of file +});