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

Add a setting for custom config files #47

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

ivank
Copy link

@ivank ivank commented Aug 18, 2024

Add mjmlConfigPath setting mimicking the cli option: https://github.com/mjmlio/mjml?tab=readme-ov-file#inside-nodejs

With this you can set the config to be a js file (.mjmlconfig.js) and thus enable custom templates and preprocessors.

After reading https://thoughtbot.com/blog/building-templated-emails-with-mjml I thought "this is the solution for using handlebars in mjml!!" But when I tried it the vscode extension didn't pick up the .mjmlconfig.js file at all.

Now while I do think mjml should pick that file up if it is available, not just .mjmlconfig, I don't think there should be anything stopping this extension to allow you to set your mjml config file directly. I'm sure it would be useful to lots of people for other purposes too.

I've also published this code in the marketplace https://marketplace.visualstudio.com/items?itemName=IvanKeirn.vscode-mjml-custom-path to demonstrate its feasibility.

- allowing the use of custom components
- and using pre-processors
@iRyusa
Copy link
Member

iRyusa commented Aug 28, 2024

Thanks for this I should be able to ship it with the next release (with MJML5 alpha builtin too 🤞 )

@ivank
Copy link
Author

ivank commented Oct 22, 2024

Any news on the release?

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

Successfully merging this pull request may close these issues.

2 participants