Skip to content

🖼 Template preview command

Compare
Choose a tag to compare
@derekrushforth derekrushforth released this 05 Dec 17:02
ba2d67d

CLI template preview

We've added a new command that spins up a local web server so that you can easily preview your compiled templates.

  • Standard templates are compiled with their layout
  • Mustachio syntax rendering
  • HTML and text version previews
  • Small and large screen previews
  • Hot reloading - Your browser will automatically reload each time you change your template

Getting started

After pulling your templates, pass the templates folder to the templates preview command:

postmark templates preview ~/templates-folder

You will also need to authenticate using your server token so that API requests can be made to Postmark's template validation endpoint. A development server will be available at https://localhost:3005. By default, the server will start on port 3005. You can specify your own port using the --port argument.

preview

Preview list

🖥📱Toggle between large and small screen sizes

preview-mobile

🔥Hot reloading

preview-reload