lingo.dev
lingo.dev copied to clipboard
Add support for EJS (Embedded JavaScript) file format
What
Implement a loader for EJS files in Replexica.
Why
To support developers using EJS templates for server-side rendering in Node.js applications.
How
- Create a new loader in
packages/cli/src/loaders/ejs.ts - Implement parsing logic for EJS structure
- Add two unit tests in
packages/cli/src/loaders/index.spec.ts:- Test parsing a simple EJS file with embedded JavaScript
- Test handling EJS includes and partials
- Update
@replexica/specto include EJS format - Generate a changeset using
pnpm newfor both 'replexica' and '@replexica/cli' packages - In the pull request, include a link to the EJS documentation or specification used
After completing the task
Noticed a file format Replexica doesn't yet support? Please create a new GitHub ticket, using the format/structure of this GitHub issue. (Make sure the ticket for that doesn't yet exist!)
Side notes
- EJS is similar to HTML in structure, but includes embedded JavaScript. It's worth investigating if we can reuse or compose parts of the HTML loader solution.
- Look into existing EJS parsing libraries that might simplify the implementation.
- Consider how this loader might interact with or complement the HTML loader, as there may be overlap in handling static content.
Hello @maxprilutskiy @vrcprl, I want to work on this issue; please assign it to me.
Assigned @HarshDodiya1 🙌
this is a good one
unassigned, so it's available again!