diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a2d1f8c..44c6a9d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -636,14 +636,14 @@ All branding elements such as logos, icons, colors and fonts should follow those Nuxt uses auto imports to make frontend development more seamless, but at times these imports malfunction. For the `Property 'PROPERTY_NAME' does not exist on type...` errors, this is caused both by having an out of sync `yarn.lock` file and having Nuxt improperly installed. -Please run [frontend/reset_local_env.sh](frontend/reset_local_env.sh) to reset the local frontend environment to allow for local testing. This can be done via the following commands: +Please run [frontend/reset_local_env.sh](frontend/reset_local_env.sh) to reset the local frontend environment to allow for local testing. This can be done via the following commands in the `frontend` directory: ```bash # Linux: - sh frontend/reset_local_env.sh + sh reset_local_env.sh # MacOS: - sh frontend/reset_local_env.sh + sh reset_local_env.sh # Windows: # Run the commands below found in frontend/reset_local_env.sh. diff --git a/frontend/reset_local_env.sh b/frontend/reset_local_env.sh index 3b09baf0..0cdd5f38 100644 --- a/frontend/reset_local_env.sh +++ b/frontend/reset_local_env.sh @@ -1,20 +1,24 @@ -# Run this script to reset the local frontend environment to allow for local testing. -# macOS: sh frontend/reset_local_env.sh -# Linux: bash frontend/reset_local_env.sh +# Run this script in the frontend directory to reset the local environment and allow for local testing. +# macOS: sh reset_local_env.sh +# Linux: bash reset_local_env.sh # Windows: Run the commands below. -# Replace local yarn.lock file with the one in main: +echo "Replacing local yarn.lock with the version on the main branch." wget -O yarn.lock https://raw.githubusercontent.com/activist-org/activist/refs/heads/main/frontend/yarn.lock -# Clear the yarn cache system wide (might take a long time): +echo "Cleaning yarn cache system wide (might take a long time)." yarn cache clean -# Delete the node_modules folder: +echo "Deleting the local node_modules directory." rm -rf node_modules +echo "Local node_modules was deleted." -# Load environment variables into your shell: +echo "Loading environment variables into your shell." set -a && source ../.env.dev && set +a +echo "Environment variables were loaded." -# Reinstall and prompt to restart IDE: +echo "Reinstalling frontend dependencies." yarn install + +echo "Local frontend environment restarted." echo "Please restart your IDE to assure that changes are picked up." diff --git a/frontend/types/communities/group.d.ts b/frontend/types/communities/group.d.ts index 050a352c..321e143f 100644 --- a/frontend/types/communities/group.d.ts +++ b/frontend/types/communities/group.d.ts @@ -1,4 +1,6 @@ +// Note: We need to import here to overwrite base types. import type { Location } from "~/types/content/location"; +import type { Event } from "~/types/events/event"; // MARK: Main Table diff --git a/frontend/types/communities/organization.d.ts b/frontend/types/communities/organization.d.ts index dc51e83a..7291a356 100644 --- a/frontend/types/communities/organization.d.ts +++ b/frontend/types/communities/organization.d.ts @@ -1,4 +1,6 @@ +// Note: We need to import here to overwrite base types. import type { Location } from "~/types/content/location"; +import type { Event } from "~/types/events/event"; // MARK: Main Table