Skip to content

feat: move all custom JS to afterInteractive #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 29, 2025
Merged
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
4 changes: 2 additions & 2 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ js:
- path: ./dist/output.js
strategy: beforeInteractive
- path: assets/heap.js
strategy: beforeInteractive
strategy: afterInteractive
- path: assets/dashboard-referral.js
strategy: beforeInteractive
strategy: afterInteractive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait it looks like below you are removing this script entirely? can't this be removed from docs.yml too then?

Copy link
Collaborator Author

@dslovinsky dslovinsky Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no! Sorry I should have made that clearer. I'm just removing the TS source code of this script since it's not really needed anymore (assuming we aren't making regular changes). The actual script we're using here is a transpiled version in assets.

I can leave it if you prefer but seems like bad practice to have both source and transpiled version in source control


experimental:
openapi-parser-v3: true
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"lint:prettier": "prettier --cache --check \"{src,scripts}/**/*.{js,jsx,ts,tsx,md,mjs,mts,json,yml,yaml}\"",
"lint:prettier:fix": "pnpm run lint:prettier --write",
"add-evm-chain": "ts-node ./scripts/add-evm-chain.ts",
"build:dashboard-tracking": "tsc scripts/dashboard-referral-tracking.ts --outDir scripts --lib DOM,ES2017 && npx terser scripts/dashboard-referral-tracking.js --compress --mangle --output fern/assets/dashboard-referral.js && echo '/* eslint-disable no-shadow */' | cat - fern/assets/dashboard-referral.js > temp && mv temp fern/assets/dashboard-referral.js && rm -f scripts/dashboard-referral-tracking.js",
"prepare": "husky"
},
"dependencies": {
Expand Down
233 changes: 0 additions & 233 deletions scripts/dashboard-referral-tracking.ts

This file was deleted.