Skip to content

Commit

Permalink
Update local env reset process and fix Event type usage in orgs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Jan 12, 2025
1 parent 2e5f818 commit 2eb17ed
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 12 additions & 8 deletions frontend/reset_local_env.sh
Original file line number Diff line number Diff line change
@@ -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."
2 changes: 2 additions & 0 deletions frontend/types/communities/group.d.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 2 additions & 0 deletions frontend/types/communities/organization.d.ts
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 2eb17ed

Please sign in to comment.