-
Notifications
You must be signed in to change notification settings - Fork 16
refactor: remove mustache #361
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the Mustache templating dependency and replaces it with a custom string replacement approach for HTML template processing. The change eliminates an external dependency while maintaining the same functionality for rendering Node.js documentation pages.
- Replaced Mustache template rendering with manual string replacement for template variables
- Removed the mustache package dependency from package.json
- Modified HTML template structure to accommodate the new rendering approach
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
src/generators/web/utils/processing.mjs | Implemented custom string replacement logic to replace Mustache.render() functionality |
src/generators/web/template.html | Updated template syntax and structure for manual string replacement |
package.json | Removed mustache dependency and added debug flag to run script |
cf0f244
to
7c2d74d
Compare
I had the same issue, that's why i used mustache. I plan to investigate further, when I get a chance. |
![]() |
If you change it to |
We should probably change all instances of unknown code replacement, to prevent it from happening at any point |
Nice catch 🎊 I put the replace back |
@flakey5 we probably need to also update upstream PR on nodejs/node for the righ binary invocation, since now the binary is doc-kit (unrelated to this PR, but just wanted to use the opportunity) |
Description
Remove the mustache dep. I can't understand why replacing the script didn't work, the template gets rendered multiple times. but concatenation works 🤔
Validation
Check List
node --run test
and all tests passed.node --run format
&node --run lint
.