lingo.dev icon indicating copy to clipboard operation
lingo.dev copied to clipboard

Add support for EJS (Embedded JavaScript) file format

Open maxprilutskiy opened this issue 2 years ago • 4 comments

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

  1. Create a new loader in packages/cli/src/loaders/ejs.ts
  2. Implement parsing logic for EJS structure
  3. 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
  4. Update @replexica/spec to include EJS format
  5. Generate a changeset using pnpm new for both 'replexica' and '@replexica/cli' packages
  6. 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.

maxprilutskiy avatar Nov 06 '24 05:11 maxprilutskiy

Hello @maxprilutskiy @vrcprl, I want to work on this issue; please assign it to me.

HarshDodiya1 avatar Dec 18 '24 11:12 HarshDodiya1

Assigned @HarshDodiya1 🙌

vrcprl avatar Dec 20 '24 17:12 vrcprl

this is a good one

maxprilutskiy avatar May 20 '25 16:05 maxprilutskiy

unassigned, so it's available again!

maxprilutskiy avatar May 20 '25 16:05 maxprilutskiy