htmlnano 1.0.0 → 2.0.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 (47) hide show
  1. package/CHANGELOG.md +55 -2
  2. package/README.md +12 -893
  3. package/docs/README.md +33 -0
  4. package/docs/babel.config.js +3 -0
  5. package/docs/docs/010-introduction.md +22 -0
  6. package/docs/docs/020-usage.md +77 -0
  7. package/docs/docs/030-config.md +21 -0
  8. package/docs/docs/040-presets.md +75 -0
  9. package/docs/docs/050-modules.md +838 -0
  10. package/docs/docs/060-contribute.md +16 -0
  11. package/docs/docusaurus.config.js +60 -0
  12. package/docs/netlify.toml +4 -0
  13. package/docs/package-lock.json +27251 -0
  14. package/docs/package.json +39 -0
  15. package/docs/sidebars.js +26 -0
  16. package/docs/versioned_docs/version-1.1.1/010-introduction.md +22 -0
  17. package/docs/versioned_docs/version-1.1.1/020-usage.md +77 -0
  18. package/docs/versioned_docs/version-1.1.1/030-config.md +21 -0
  19. package/docs/versioned_docs/version-1.1.1/040-presets.md +75 -0
  20. package/docs/versioned_docs/version-1.1.1/050-modules.md +786 -0
  21. package/docs/versioned_docs/version-1.1.1/060-contribute.md +16 -0
  22. package/docs/versioned_docs/version-2.0.0/010-introduction.md +22 -0
  23. package/docs/versioned_docs/version-2.0.0/020-usage.md +77 -0
  24. package/docs/versioned_docs/version-2.0.0/030-config.md +21 -0
  25. package/docs/versioned_docs/version-2.0.0/040-presets.md +75 -0
  26. package/docs/versioned_docs/version-2.0.0/050-modules.md +838 -0
  27. package/docs/versioned_docs/version-2.0.0/060-contribute.md +16 -0
  28. package/docs/versioned_sidebars/version-1.1.1-sidebars.json +8 -0
  29. package/docs/versioned_sidebars/version-2.0.0-sidebars.json +8 -0
  30. package/docs/versions.json +4 -0
  31. package/lib/helpers.js +19 -1
  32. package/lib/htmlnano.js +67 -6
  33. package/lib/modules/collapseAttributeWhitespace.js +63 -7
  34. package/lib/modules/collapseWhitespace.js +42 -17
  35. package/lib/modules/minifyCss.js +8 -8
  36. package/lib/modules/minifyJs.js +9 -10
  37. package/lib/modules/minifySvg.js +5 -2
  38. package/lib/modules/minifyUrls.js +71 -29
  39. package/lib/modules/normalizeAttributeValues.js +48 -0
  40. package/lib/modules/removeComments.js +25 -1
  41. package/lib/modules/removeEmptyAttributes.js +53 -8
  42. package/lib/modules/removeRedundantAttributes.js +69 -14
  43. package/lib/modules/removeUnusedCss.js +10 -10
  44. package/lib/presets/max.js +2 -0
  45. package/lib/presets/safe.js +13 -13
  46. package/package.json +58 -21
  47. package/test.js +25 -16
package/CHANGELOG.md CHANGED
@@ -3,6 +3,43 @@ All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
 
6
+ ## [2.0.0] - 2022-01-12
7
+ *The major version has to be released because of vulnerability in PostCSS (see [#165])*
8
+
9
+ ### Changed
10
+ - Support optional dependencies [#168] (`minifyUrl`, ` minifyJs`, `removeUnusedCss`, `minifyCss`). *This might be a breaking change for you*. Check the docs: https://github.com/posthtml/htmlnano/pull/168/files
11
+ - Disable `mergeScripts` & `mergeStyles` in the safe preset [#170].
12
+
13
+
14
+ ## [1.1.1] - 2021-09-19
15
+ This version fixes fatal errors introduced in [1.1.0].
16
+
17
+
18
+ ## [1.1.0] - 2021-09-19
19
+ *This version contains fatal errors. Please use [1.1.1] instead.*
20
+
21
+ ### Added
22
+ - Collapse missing value default attribute in `removeRedundantAttributes` [#158].
23
+ - New `normalizeAttributeValues` module to normalize casing of attribute values [#163].
24
+ - Custom matcher for `removeComments` [#156].
25
+
26
+ ### Changed
27
+ - Remove more empty attributes in `removeEmptyAttributes` [#161].
28
+ - Enhance collapse whitespace in `collapseWhitespace` [#145].
29
+ - `minifyJs` and `minifyUrls` enhancement [#159].
30
+ - Enhance attribute collapse whitespace in `collapseAttributeWhitespace` [#157].
31
+
32
+
33
+
34
+ ## [1.0.1] - 2021-09-11
35
+ ### Added
36
+ - Support of [@novaatwarren/uncss](https://github.com/novaatwarren/uncss) fork [#154]
37
+
38
+ ### Changed
39
+ - SVGO plugins configuration [#153]
40
+
41
+
42
+
6
43
  ## [1.0.0] - 2021-04-17
7
44
  After more than 4 years of development, it's time to release a stable [1.0.0](https://github.com/posthtml/htmlnano/releases/tag/1.0.0) version 🎉
8
45
 
@@ -196,6 +233,10 @@ Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https:
196
233
  - Remove attributes that contains only white spaces.
197
234
 
198
235
 
236
+ [2.0.0]: https://github.com/posthtml/htmlnano/compare/1.1.1...2.0.0
237
+ [1.1.1]: https://github.com/posthtml/htmlnano/compare/1.1.0...1.1.1
238
+ [1.1.0]: https://github.com/posthtml/htmlnano/compare/1.0.1...1.1.0
239
+ [1.0.1]: https://github.com/posthtml/htmlnano/compare/1.0.0...1.0.1
199
240
  [1.0.0]: https://github.com/posthtml/htmlnano/compare/0.2.9...1.0.0
200
241
  [0.2.9]: https://github.com/posthtml/htmlnano/compare/0.2.8...0.2.9
201
242
  [0.2.8]: https://github.com/posthtml/htmlnano/compare/0.2.7...0.2.8
@@ -218,6 +259,18 @@ Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https:
218
259
  [0.1.2]: https://github.com/posthtml/htmlnano/compare/0.1.1...0.1.2
219
260
  [0.1.1]: https://github.com/posthtml/htmlnano/compare/0.1.0...0.1.1
220
261
 
262
+ [#170]: https://github.com/posthtml/htmlnano/issues/170
263
+ [#168]: https://github.com/posthtml/htmlnano/issues/168
264
+ [#165]: https://github.com/posthtml/htmlnano/issues/165
265
+ [#163]: https://github.com/posthtml/htmlnano/issues/163
266
+ [#161]: https://github.com/posthtml/htmlnano/issues/161
267
+ [#159]: https://github.com/posthtml/htmlnano/issues/159
268
+ [#158]: https://github.com/posthtml/htmlnano/issues/158
269
+ [#157]: https://github.com/posthtml/htmlnano/issues/157
270
+ [#156]: https://github.com/posthtml/htmlnano/issues/156
271
+ [#154]: https://github.com/posthtml/htmlnano/issues/154
272
+ [#153]: https://github.com/posthtml/htmlnano/issues/153
273
+ [#145]: https://github.com/posthtml/htmlnano/issues/145
221
274
  [#135]: https://github.com/posthtml/htmlnano/issues/135
222
275
  [#129]: https://github.com/posthtml/htmlnano/issues/129
223
276
  [#125]: https://github.com/posthtml/htmlnano/issues/125
@@ -231,10 +284,10 @@ Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https:
231
284
  [#112]: https://github.com/posthtml/htmlnano/issues/112
232
285
  [#111]: https://github.com/posthtml/htmlnano/issues/111
233
286
  [#110]: https://github.com/posthtml/htmlnano/issues/110
234
- [#107]: https://github.com/posthtml/htmlnano/issues/107
235
287
  [#108]: https://github.com/posthtml/htmlnano/issues/108
236
- [#102]: https://github.com/posthtml/htmlnano/issues/102
288
+ [#107]: https://github.com/posthtml/htmlnano/issues/107
237
289
  [#104]: https://github.com/posthtml/htmlnano/issues/104
290
+ [#102]: https://github.com/posthtml/htmlnano/issues/102
238
291
  [#98]: https://github.com/posthtml/htmlnano/issues/98
239
292
  [#95]: https://github.com/posthtml/htmlnano/issues/95
240
293
  [#94]: https://github.com/posthtml/htmlnano/issues/94