@jemjar/emails v2.4.1
JEMJAR EMAILS
DEVELOPMENT
In order to ease development, there is a gulp file with many tasks. For template development, most likely you'll just need to run:
gulpThe default gulp does the following
- Render all templates
- Start a server at http://localhost:8080 where all emails will be available in the browser
- Re-render the appropriate email when the main email file is edited
- Re-render all templates when a block is edited
On re-rendering, the browser will refresh automatically.
NOTE FOR DEVELOPERS USING WINDOWS
You need to either:
- install ts-node globally
- find a way to make ts-node work as a local command (
node_modules/.bin/ts-node) and changegulpfile.js
HOW TO ADD NEW ILLUSTRATION
- Add a new illustration to
.\static\folder - Add new url variable in
.\static\urls.tsfile - Include new url variable to an email template
- Re-run
gulpin order to see the illustration in the browser
Illustrations update automatically on s3 bucket on deployment.
.NJK FORMATTING
- Install a plugin for your code editor to format .njk files
- Apply formatting rules from .njkformat file
For VS Code:
- Install
jkformat- https://marketplace.visualstudio.com/items?itemName=jaskang.jkformat - In the file
%USERPROFILE%\.vscode\extensions\jaskang.jkformat-1.0.6\out\src\beautify\index.js(for Windows) change value ofunformattedprop inargsobject in a functionbeatify()fromtruetofalse(to prevent case changing of a template's variables inside html tags) - Copy settings from
.njkformatfile to your Workspace settings
{
"settings": {
"jkformat": {
// Paste your .njk formatting rules from .njkformat file here
}
},
}- Open .njk file and run
jkformatcommand to format your code - If you want to update
.njkformatsee default settings in%USERPROFILE%\.vscode\extensions\jaskang.jkformat-1.0.6\out\src\beautify\options.js(for Windows)
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago