Skip to content

Commit

Permalink
chore(engines): set minimum nodejs version and add some info about it
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Jun 11, 2023
1 parent b4a2bd7 commit 44de7c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Set 'override' to false if you don't want to hijack the ordinary res.render func
res.renderMin function to the response object to render minimized HTML.

The 'htmlMinifier' opts are simply passed on to the `html-minifier-terser` plugin. For all the available configuration
options, see [the original repo!](https://github.com/terser/html-minifier-terser#options-quick-reference)
options, see [the original repo](https://github.com/terser/html-minifier-terser#options-quick-reference)!

If no callback is provided, res.render/res.renderMin sends the minified HTML to the client just as the regular
express res.render does. Otherwise, the callback is called with the error object and the minified HTML content, as
Expand All @@ -77,6 +77,11 @@ exceptionUrls: [

Full examples can naturally be found under the 'examples'-folder of this repository!

## Other infos

The code inside minifier.js should be compatible with nodejs 6.0.0,
but since `html-minifier-terser` requires "^14.13.1" the package also requires at least nodejs 14.0.0

## License

MIT © [Matti Jokitulppo](http://mattij.com)
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"scripts": {
"test": "node tests"
},
"engines": {
"npm": ">=6.4.0",
"node": ">=14.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/meszaros-lajos-gyorgy/express-minify-html-2.git"
Expand All @@ -18,7 +22,7 @@
"minify"
],
"author": "Matti Jokitulppo <melonmanchan@gmail.com>",
"contributors": [
"maintainers": [
"Lajos Mészáros <m_lajos@hotmail.com>"
],
"license": "MIT",
Expand Down

0 comments on commit 44de7c2

Please sign in to comment.