-
-
Notifications
You must be signed in to change notification settings - Fork 151
Description
Feature Type
- New documentation topic
- Site functionality improvement
- UI/UX enhancement
- Search improvement
- Navigation enhancement
- Developer experience
- Other (please describe)
Problem Statement
Since the documentation contains multiple languages that are getting compiled even when developing, the developing experience is not as great as it could be.
The goal is to minimize the compiletime to mere seconds rather than minutes.
Proposed Solution
To prevent long compiletimes in development mode it would be a good idea to remove all languages except english temporarily when developing locally and re-adding them once the development is done and it is ready to get pushed.
The setup uses the same logic as the prebuilt.ts file that executes git commands before building the project. For bun run dev the proposed setup would use a new file called predev.ts that removes all languages from the project except en. This improves the compiletime for the documentation to merely seconds instead of minutes.
Additionally a new script would be required to restore all files that got removed by the predev.ts file. Something like bun run dev:restore.
To prevent contributors from pushing the deleted files a possible solution could be to use a pre-commit tool like Husky. Its goal is to restore the languages when the contributor creates a commit to prevent unwanted changes from any of the language files.