2.4.1 • Published 5 years ago

@jemjar/emails v2.4.1

Weekly downloads
3
License
UNLICENSED
Repository
gitlab
Last release
5 years ago

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:

gulp

The 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 change gulpfile.js

HOW TO ADD NEW ILLUSTRATION

  1. Add a new illustration to .\static\ folder
  2. Add new url variable in .\static\urls.ts file
  3. Include new url variable to an email template
  4. Re-run gulp in 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 of unformatted prop in args object in a function beatify() from true to false (to prevent case changing of a template's variables inside html tags)
  • Copy settings from .njkformat file to your Workspace settings
{
	"settings": {
		"jkformat": {
			// Paste your .njk formatting rules from .njkformat file here
		}
	},
}
  • Open .njk file and run jkformat command to format your code
  • If you want to update .njkformat see default settings in %USERPROFILE%\.vscode\extensions\jaskang.jkformat-1.0.6\out\src\beautify\options.js (for Windows)
2.4.1

5 years ago

2.4.0

5 years ago

2.3.3

5 years ago

2.3.1

5 years ago

2.3.0

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.0

5 years ago

2.1.6

5 years ago

2.1.5

5 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

1.10.0

6 years ago

1.9.0

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0-3

6 years ago

1.2.0-2

6 years ago

1.2.0-1

6 years ago

1.2.0

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

1.0.0-beta.9

6 years ago

1.0.0-beta.8

6 years ago

1.0.0-beta.7

6 years ago

1.0.0-beta.6

6 years ago

1.0.0-beta.5

6 years ago

1.0.0-beta.4

6 years ago

1.0.0-beta.3

6 years ago

1.1.0-0

6 years ago

1.0.0-beta.2

6 years ago

1.0.0-beta.1

6 years ago

1.0.13-0

6 years ago

1.0.12-0

6 years ago

1.0.11-0

6 years ago

1.0.10-0

6 years ago

1.0.9-0

6 years ago

1.0.8-0

6 years ago

1.0.7-0

6 years ago

1.0.6-0

6 years ago

1.0.5-0

6 years ago

1.0.4-0

6 years ago

1.0.3-0

6 years ago

1.0.2-0

6 years ago

1.0.1-0

6 years ago

1.0.0-0

6 years ago