VTEX Emails
VTEX Emails is an email framework based on bojler for developing transactional email templates for VTEX E-commerces.
Features
VTEX Emails inherited Bojler's features like:
SASS support
Automatic CSS inlining
Embedded CSS
Webserver with Live Reload
Reset styles
Responsive design
And it has other important features:
Handlebars compiling
Tachyons integration
Partials for code reuse
VTEX transactional JSONs examples for preview
i18n for internationalization
Folders and structure
publiccompiled files for previewdistcompiled files for exportingsourceworking folderdataJSON files containing Orders datahelpersVTEX's Helpers functionslocalesi18n filessassstylestemplatese-mails templatespartialse-mails parts
You must NOT add, change or modify:
helpersyou can use only Handlebars and VTEX's Helpers
You can add, change or modify:
datayou can create folders with different JSON examples as well. They must have a real VTEX JSON structurelocalesuse your own communicationsassuse your own styletemplatesname your templates your own way. Each template must have a JSON file with the same name.partialsuse the partials that make sense for you
Hands on
Installation
Download or clone VTEX Emails
Install npm dependencies: run
npm install
Developing
Requires node
16.xRun
npm run gulp devGo to http://localhost:8000/
Choose the language folder and open the template that you want to preview
Generating an exportable VTEX template
Run
npm run gulp distGo to
distfolder, copy the template content and paste it in VTEX Message Center
Generating a light preview version for testing
Run
npm run gulp previewGo to
publicfolder, copy the template content and test it using services like MailChimp
Changing JSON data set
Stop npm service
Create a new folder in
source/dataChange
orderJsonToReadvariable ingulpfile.jsto the new folder nameStart npm service
To do
Live reload is not working very well. Sometimes you need to refresh the page manually
Recompiling doesn't work for JSON changes. You'll need to stop npm service and start it again
Improve Outlook compatibility
Improve VTEX inStore scenarios
Bugs and feature requests
If you find a bug or need new feature please open a new issue and we will discuss about it.
Thank you! :)
Last updated