DEV Community

3 tools to enhance your email workflow

JZ on August 06, 2018

#1 Use a task runner Gulp's a great tool that allows you to automate any of the development work you find yourself working on each time you buil...
Collapse
 
kzagoris profile image
Konstantinos Zagoris

For template framework I use mjml.io which it is creating email html compatible code

Collapse
 
joshzaldana profile image
JZ

Oh nice - MJML is another fantastic templating language. I tried it out a while back, but never got into creating custom template themes - are you using MJML for custom work?

Collapse
 
kzagoris profile image
Konstantinos Zagoris

Yes, for my start up (swaiver.com). The whole email backend (invoices, newsletter campaigns, notifications, etc) is currently being build on mailjet and mlml and we are very satisfied.

Collapse
 
peter profile image
Peter Kim Frank

This is great, thanks for sharing. I had never heard of Nunjucks.

Collapse
 
joshzaldana profile image
JZ

I hadn't heard of Nunjucks prior to using it - was previously on Handlebars. The language itself is relatively easy to pick up and use. Thanks for the read.

Collapse
 
michaelgv profile image
Mike

Nunjucks is nice, it reminds me very much of Twig. However, I’ve personally started using the Twig JS implementation recently. Has anyone had a chance to play around with it?

Collapse
 
joshzaldana profile image
JZ

Ah man, I used Twig with my last team; there are definite similarities between the two. I haven't used the JS implementation. What editor are you working from Michael?

Collapse
 
michaelgv profile image
Mike

I'm usually in vim, but in the rare event I'll open vscode with vim mode.

Thread Thread
 
joshzaldana profile image
JZ • Edited

ooh, nice. Vim's one of the editors I haven't had the chance to try out. It's on my list to do for sure.

Collapse
 
qm3ster profile image
Mihail Malo

What do you think of the Pug templating language?
There are plugins for all the popular task runners.
The syntax has layouts/mixins/includes.

Collapse
 
joshzaldana profile image
JZ

I haven't used Pug, but interestingly enough shortly after building my workflow I stumbled across an article that highlighted Pug. I take it you use it, Mihail? Similarly to what I asked Michael, what editor are you using?

Collapse
 
qm3ster profile image
Mihail Malo

You may have also seen Pug under the name Jade, they rebranded.

I shamefully enough use VS Code for now.

I currently use Pug as the template language inside Vue.js .vue single file component files, which means I basically don't use it for templating - no conditionals, no includes, no iteration, no nothing.

I previously used it with Gulp for static (no-js) site generation.

Apparently it's so popular that now even emmet shortcuts work with it.
Not in Vue files for me, but it's terse enough for that not to matter.
A key part of that is that there are no closing tags, so if you want to swap out or rename a tag/component, you don't have to look for the closing tag. Which also means that the file is almost half the lines, easier to overview.
On the other hand, you do have to be careful with indentation, namely exactly one issue: When you press Enter, at what indentation does your editor place you compared to the last line. -1? 0? +1?

There's an even more extreme language called slm wherein you can drop even more parenthesis (everything is optional but permitted, like in stylus stylesheet language; I'd say slm is to Pug as Sass is to SCSS) but it's not as widespread so doesn't have as much of an ecosystem.

The pug syntax is also very similar to the "concise syntax" available in Marko, ebay's UI library/framework.