Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ yarn-error.log*
# local env files
.env*.local

# local dev data
/public/data

# vercel
.vercel

Expand Down
7 changes: 6 additions & 1 deletion script/prepare-chain-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ cat > "$OUTPUT_FILE" <<EOL
EOL

bun fmt
echo "✅ Successfully updated chains.json file"
echo "✅ Successfully updated features.json file"

# Copy data to public/ so Next.js can serve it locally in dev mode.
rm -rf ./public/data
cp -r ./script/data ./public/data
echo "✅ Copied data to public/data for local dev"
5 changes: 4 additions & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export const TWITTER_URL = 'https://twitter.com/msolomon44';

// -------- Other Data --------
const BRANCH_NAME = process.env.NEXT_PUBLIC_BRANCH_NAME;
export const BASE_DATA_URL = `https://raw.githubusercontent.com/mds1/evm-diff/${BRANCH_NAME}/script/data`;
export const BASE_DATA_URL =
process.env.NODE_ENV === 'development'
? '/data'
: `https://raw.githubusercontent.com/mds1/evm-diff/${BRANCH_NAME}/script/data`;

// This defines the source of truth for the data that is shown/hidden on the website.
export interface Feature {
Expand Down