@ohos-ports/html-minifier-next 8.4.2-beta.0

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.
Files changed (51) hide show
  1. package/LICENSE.txt +23 -0
  2. package/README.md +776 -0
  3. package/cli.js +1209 -0
  4. package/dist/types/htmlminifier.d.ts +556 -0
  5. package/dist/types/htmlminifier.d.ts.map +1 -0
  6. package/dist/types/htmlparser.d.ts +25 -0
  7. package/dist/types/htmlparser.d.ts.map +1 -0
  8. package/dist/types/lib/attributes.d.ts +155 -0
  9. package/dist/types/lib/attributes.d.ts.map +1 -0
  10. package/dist/types/lib/constants.d.ts +110 -0
  11. package/dist/types/lib/constants.d.ts.map +1 -0
  12. package/dist/types/lib/content.d.ts +51 -0
  13. package/dist/types/lib/content.d.ts.map +1 -0
  14. package/dist/types/lib/elements.d.ts +57 -0
  15. package/dist/types/lib/elements.d.ts.map +1 -0
  16. package/dist/types/lib/fragments.d.ts +46 -0
  17. package/dist/types/lib/fragments.d.ts.map +1 -0
  18. package/dist/types/lib/option-definitions.d.ts +33 -0
  19. package/dist/types/lib/option-definitions.d.ts.map +1 -0
  20. package/dist/types/lib/options.d.ts +120 -0
  21. package/dist/types/lib/options.d.ts.map +1 -0
  22. package/dist/types/lib/unused-css.d.ts +46 -0
  23. package/dist/types/lib/unused-css.d.ts.map +1 -0
  24. package/dist/types/lib/urls.d.ts +15 -0
  25. package/dist/types/lib/urls.d.ts.map +1 -0
  26. package/dist/types/lib/utils.d.ts +102 -0
  27. package/dist/types/lib/utils.d.ts.map +1 -0
  28. package/dist/types/lib/whitespace.d.ts +45 -0
  29. package/dist/types/lib/whitespace.d.ts.map +1 -0
  30. package/dist/types/presets.d.ts +49 -0
  31. package/dist/types/presets.d.ts.map +1 -0
  32. package/dist/types/tokenchain.d.ts +26 -0
  33. package/dist/types/tokenchain.d.ts.map +1 -0
  34. package/html-minifier-next.schema.json +306 -0
  35. package/package.json +100 -0
  36. package/src/htmlminifier.js +2294 -0
  37. package/src/htmlparser.js +1069 -0
  38. package/src/lib/attributes.js +928 -0
  39. package/src/lib/constants.js +285 -0
  40. package/src/lib/content.js +190 -0
  41. package/src/lib/elements.js +274 -0
  42. package/src/lib/file-pool.js +177 -0
  43. package/src/lib/fragments.js +274 -0
  44. package/src/lib/option-definitions.js +231 -0
  45. package/src/lib/options.js +730 -0
  46. package/src/lib/unused-css.js +379 -0
  47. package/src/lib/urls.js +155 -0
  48. package/src/lib/utils.js +861 -0
  49. package/src/lib/whitespace.js +321 -0
  50. package/src/presets.js +57 -0
  51. package/src/tokenchain.js +123 -0
package/package.json ADDED
@@ -0,0 +1,100 @@
1
+ {
2
+ "author": "Jens Oliver Meiert",
3
+ "bin": {
4
+ "html-minifier-next": "./cli.js",
5
+ "hmn": "./cli.js"
6
+ },
7
+ "bugs": {
8
+ "url": "https://github.com/ohos-ports/ohos-ports/issues"
9
+ },
10
+ "dependencies": {
11
+ "commander": "^15.0.0",
12
+ "entities": "^8.1.0",
13
+ "svgo": "^4.1.0",
14
+ "terser": "^5.51.2",
15
+ "@ohos-ports/lightningcss": "^1.33.0-1"
16
+ },
17
+ "description": "Highly effective, super-configurable, well-tested web page minifier (enhanced successor to HTML Minifier)",
18
+ "devDependencies": {
19
+ "@commitlint/cli": "^21.2.2",
20
+ "@eslint/js": "^10.0.1",
21
+ "@types/node": "^26.5.0",
22
+ "eslint": "^10.10.0",
23
+ "globals": "^17.12.0",
24
+ "typescript": "^7.0.2",
25
+ "vite": "^8.2.2",
26
+ "@ohos-ports/swc-core": "^1.16.2"
27
+ },
28
+ "engines": {
29
+ "node": ">=22.13"
30
+ },
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/types/htmlminifier.d.ts",
34
+ "import": "./src/htmlminifier.js"
35
+ },
36
+ "./package.json": "./package.json"
37
+ },
38
+ "files": [
39
+ "cli.js",
40
+ "dist/types",
41
+ "html-minifier-next.schema.json",
42
+ "src"
43
+ ],
44
+ "funding": "https://github.com/j9t/html-minifier-next?sponsor=1",
45
+ "homepage": "https://j9t.github.io/html-minifier-next/",
46
+ "keywords": [
47
+ "cli",
48
+ "compress",
49
+ "compressor",
50
+ "css",
51
+ "html",
52
+ "htmlmin",
53
+ "javascript",
54
+ "js",
55
+ "min",
56
+ "minification",
57
+ "minifier",
58
+ "minify",
59
+ "optimize",
60
+ "optimizer",
61
+ "pack",
62
+ "packer",
63
+ "svg",
64
+ "svgo",
65
+ "swc",
66
+ "terser",
67
+ "uglifier",
68
+ "uglify"
69
+ ],
70
+ "license": "MIT",
71
+ "name": "@ohos-ports/html-minifier-next",
72
+ "peerDependencies": {
73
+ "@ohos-ports/swc-core": "^1.15.43-beta.1"
74
+ },
75
+ "peerDependenciesMeta": {
76
+ "@ohos-ports/swc-core": {
77
+ "optional": true
78
+ }
79
+ },
80
+ "repository": {
81
+ "type": "git",
82
+ "url": "https://github.com/ohos-ports/ohos-ports.git",
83
+ "directory": "ports/html-minifier-next/8.4.2"
84
+ },
85
+ "scripts": {
86
+ "build": "tsc && npm run build:schema",
87
+ "build:docs": "vite build --base /html-minifier-next/",
88
+ "build:schema": "node scripts/build-schema.js",
89
+ "deploy": "npm run build && npm run build:docs",
90
+ "lint": "eslint .",
91
+ "prebuild": "node --input-type=module --eval \"import {rmSync} from 'fs';rmSync('dist',{recursive:true,force:true})\"",
92
+ "serve": "vite",
93
+ "test": "npm run test:types && node --test \"test/**/*.test.js\"",
94
+ "test:types": "tsc --noEmit && tsc --project tsconfig.test.json",
95
+ "test:watch": "node --test --watch \"test/**/*.test.js\""
96
+ },
97
+ "type": "module",
98
+ "types": "dist/types/htmlminifier.d.ts",
99
+ "version": "8.4.2-beta.0"
100
+ }