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 - support other file extensions #25

Open
drewbaker opened this issue Jul 11, 2020 · 4 comments
Open

Feature request - support other file extensions #25

drewbaker opened this issue Jul 11, 2020 · 4 comments

Comments

@drewbaker
Copy link

drewbaker commented Jul 11, 2020

Currently I have to store the templates as .hbs so that I can inject variables into them. To render the preview, I need to rename the file to .mjml, then I rename it again once I'm finished. Is there a way to have the preview open on other file extensions?

I tried selecting the file, then using Packages > mjm-preview > MJML Preview but it still doesn't work.

@iRyusa
Copy link
Member

iRyusa commented Jul 11, 2020

Did you tried to keep both extension .hbs.mjml ?

@drewbaker
Copy link
Author

Yes that works. But it's not ideal. Would be great if there was a setting in the package that allowed us to edit the file extensions that the preview panel monitored, or at least a way to tell the preview panel to attempt to render a selected file?

@iRyusa
Copy link
Member

iRyusa commented Aug 4, 2020

The extension is a bit old so IDK how easy that would be to do so. I think if you change the grammar as MJML even if the file doesn't have MJML extension that would work https://github.com/mjmlio/atom-mjml-preview/blob/master/lib/mjml-preview.js#L52

@drewbaker
Copy link
Author

OK will check that out thanks

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