Skip to content
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

feature request: add option to ignore backticks around template, or alternatively a preprocess function #144

Open
squivix opened this issue Sep 21, 2023 · 2 comments

Comments

@squivix
Copy link

squivix commented Sep 21, 2023

Until .jstl files are well supported, I'm gonna tell my IDE to parse them as js files, and surround the whole template in backticks `` .

It would be nice to have a convenient option to get rid of backticks automatically upon loading the template file. Or alternatively a function to preprocess the template string so I can do that manually

@ahmadnassri
Copy link
Owner

ahmadnassri commented Sep 21, 2023

you could also simply assign a custom extension like html

const Engine = require('@ahmadnassri/template-literals-engine')

const engine = new Engine({
  root: 'templates',
  extension: 'html'
  }
})

@ahmadnassri
Copy link
Owner

I do like the idea of a preprocessing hook though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants