github maizzle/framework v3.1.0

latest releases: v4.8.4, v4.8.3, v4.8.2...
3 years ago

This release seriously speeds up Template compilation time when developing locally. We've also refactored some Transformers so they're simpler to use or disable, and you can now even use expressions in front matter!

New features

Faster development

c3bdb9e

Maizzle is now much faster when developing locally with the maizzle serve command.

We eager-compile Tailwind so that changes to Templates take <300ms to be compiled and reflected in the browser. We've tested this with projects that have over 30 Templates, and in some cases this is an order of magnitude faster 🤯

Note: when you make changes to non-Template files like Layouts or tailwind.config.js, Maizzle will still rebuild all your Templates.

Expressions in front matter

6b6a233

You can now use expressions in front matter:

---
data: Environment is {{ page.env }}
---

<extends src="src/layouts/master.html">
  <block name="template">
    {{ page.data }}
  </block>
</extends>

All expressions are supported, so you can even use PostHTML tags there.

Note: front matter keys cannot be used in expressions inside front matter, so this won't work:

---
title: Environment is {{ page.env }}
data: Page title is {{ page.title }}
---

Simplified Transformers

It's now easier to enable a Transformer:

  • set it directly to true
  • pass it a non-empty options object

For example, here's how you can enable CSS inlining now:

module.exports = {
  inlineCSS: true
}

See the docs for info on each Transformer.

Transformer disabling

  • you can now individually disable Transformers that run by default #377

There's also a new option to disable all Transformers:

module.exports ={
  applyTransformers: false
}

Configure plaintext

fee3e9b

Maizzle now supports configuring the Plaintext generator - you can specify the path and extension for it to use:

module.exports ={
  plaintext: {
    destination: {
      path: '',
      extension: ''
    }
  }
}

Of course, these can be used in front matter:

---
plaintext:
  destination:
    path: dist/plaintext/my-template.txt
---

...or:

---
plaintext:
  destination:
    extension: rtxt
---

See the plaintext docs for more info.

Added

Updated

  • refactored file watching so we're now watching Templates sources separate from other file sources c408733
  • remove empty class="" attributes by default dc1b0c2

v3.0.1...v3.1.0

Don't miss a new framework release

NewReleases is sending notifications on new releases.