In the next release of DADI Web, version 5.0, we’ll be adding a small but powerful new feature we’re calling ‘post processors’ (borrowed from a little known Wordpress feature).
For example you may want to enforce a style-guide amongst several editors, such as enforcing typographers quotes or converting units of measurement automatically for different audiences.
One use we’ve been finding it particularly useful for is minifying the HTML output of a website.
Example
This process is very straightforward thanks to a NPM package called html-minifier, so let’s go ahead and install that in our project:
npm install html-minifierNext we will create a file event in the new workspaces folder processors.
workspace/processors/minify-html.js
const minify = require('html-minifier').minify
module.
Updates
Last Updated:
September 2019

