express-beautify
This tool make express output HTML, JS, CSS human-readable, rendered by any template engine.
Yes, minify also supported! You can beautify youe code at development, minify it at production.
Usage
Install
npm install express-beautify
Setup
var express = ;var engines = ; // Here use consolidate + Swig foe examplevar expressBeautify = /*Options*/; var app = ; app; // render html file using swig app; // render js file using swig app; // render css file using swig app; app; // express-beautify filter
Examples
// Render something app; app; app; // Send something app; app; app; app;
Beautify Default Options
See js-beautify
Minify
var expressMinify = ;app;
Minify Default Options
See html-minifier