From ee9fc50741692e536b5735878f70f71365cf995c Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Sat, 23 Oct 2021 17:42:26 +1100 Subject: [PATCH] Implement CLI wrapper for Node.js; fix Node.js TS defs --- CHANGELOG.md | 5 +++++ nodejs/cli.js | 26 ++++++++++++++++++++++++++ nodejs/index.d.ts | 4 ++-- nodejs/package.json.gen.js | 6 ++++++ 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100755 nodejs/cli.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 87fb7e2..a9fb79f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # minify-html changelog +## 0.6.10 + +- Fixed the Node.js library TypeScript definitions. `minifyJs` has been fixed to `minify_js` and `minifyCss` has been fixed to `minify_css`. This is not a breaking change the library itself only ever accepted the fixed names, so this is actually a typo fix. +- Implemented a basic CLI script for Node.js to allow using the library from the command line e.g. quick testing or sandboxing without needing to download and install the CLI separately. It accepts all configuration properties (all of which are currently booleans) using hyphen case e.g. `--do-not-minify-doctype`, as well as `--output [path]` and one default (i.e. not after an option switch) argument for the path to the input. It's only a few lines long and should not have a tangible effect on library size. + ## 0.6.9 - Intrepret `type=module` on `