@localnerve/web-component-build 0.3.8 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -116,7 +116,7 @@ Full path to the output directory where css, html, and javascript output are wri
116
116
  }
117
117
  ```
118
118
 
119
- * **htmlminOptions** {Object} - The [html minifier options](https://github.com/kangax/html-minifier/blob/gh-pages/README.md#options-quick-reference) object
119
+ * **htmlminOptions** {Object} - The [html minifier options](https://github.com/terser/html-minifier-terser?tab=readme-ov-file#options-quick-reference) object
120
120
  Defaults:
121
121
  ```
122
122
  {
package/lib/build.js CHANGED
@@ -8,7 +8,7 @@
8
8
  import * as path from 'node:path';
9
9
  import * as fs from 'node:fs/promises';
10
10
  import CleanCss from 'clean-css';
11
- import {minify as _minifyHtml} from 'html-minifier';
11
+ import {minify as _minifyHtml} from 'html-minifier-terser';
12
12
  import {minify as _minifyJs} from 'terser';
13
13
 
14
14
  export const defaultHtmlMinifyOptions = {
@@ -87,7 +87,7 @@ class WebComponentBuild {
87
87
  */
88
88
  async minifyHtml (htmlText, options = defaultHtmlMinifyOptions) {
89
89
  const minifiedHtml =
90
- this.minifySkip ? htmlText : _minifyHtml(htmlText, options);
90
+ this.minifySkip ? htmlText : await _minifyHtml(htmlText, options);
91
91
 
92
92
  await fs.writeFile(this.outputHtmlFile, minifiedHtml, {
93
93
  encoding: 'utf8'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localnerve/web-component-build",
3
- "version": "0.3.8",
3
+ "version": "0.4.1",
4
4
  "description": "A library to help build web components",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -48,15 +48,15 @@
48
48
  "dependencies": {
49
49
  "cheerio": "^1.0.0-rc.12",
50
50
  "clean-css": "^5.3.3",
51
- "html-minifier": "^4.0.0",
52
- "terser": "^5.30.3"
51
+ "html-minifier-terser": "^7.2.0",
52
+ "terser": "^5.31.1"
53
53
  },
54
54
  "devDependencies": {
55
- "@babel/preset-env": "^7.24.4",
56
- "eslint": "^9.0.0",
57
- "@eslint/js": "^9.0.0",
58
- "eslint-plugin-jest": "^28.0.0",
59
- "globals": "^15.0.0",
55
+ "@babel/preset-env": "^7.24.7",
56
+ "eslint": "^9.5.0",
57
+ "@eslint/js": "^9.5.0",
58
+ "eslint-plugin-jest": "^28.6.0",
59
+ "globals": "^15.4.0",
60
60
  "jest": "^29.7.0",
61
61
  "tempy": "^3.1.0"
62
62
  },