htmlnano 0.2.9 → 1.1.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/CHANGELOG.md +57 -2
- package/README.md +15 -886
- package/docs/README.md +33 -0
- package/docs/babel.config.js +3 -0
- package/docs/docs/010-introduction.md +22 -0
- package/docs/docs/020-usage.md +77 -0
- package/docs/docs/030-config.md +21 -0
- package/docs/docs/040-presets.md +75 -0
- package/docs/docs/050-modules.md +786 -0
- package/docs/docs/060-contribute.md +16 -0
- package/docs/docusaurus.config.js +60 -0
- package/docs/netlify.toml +4 -0
- package/docs/package-lock.json +11621 -0
- package/docs/package.json +39 -0
- package/docs/sidebars.js +26 -0
- package/docs/versioned_docs/version-1.1.1/010-introduction.md +22 -0
- package/docs/versioned_docs/version-1.1.1/020-usage.md +77 -0
- package/docs/versioned_docs/version-1.1.1/030-config.md +21 -0
- package/docs/versioned_docs/version-1.1.1/040-presets.md +75 -0
- package/docs/versioned_docs/version-1.1.1/050-modules.md +786 -0
- package/docs/versioned_docs/version-1.1.1/060-contribute.md +16 -0
- package/docs/versioned_sidebars/version-1.1.1-sidebars.json +8 -0
- package/docs/versions.json +3 -0
- package/lib/helpers.js +5 -0
- package/lib/htmlnano.js +43 -6
- package/lib/modules/collapseAttributeWhitespace.js +62 -6
- package/lib/modules/collapseWhitespace.js +42 -17
- package/lib/modules/minifyCss.js +4 -2
- package/lib/modules/minifyJs.js +5 -3
- package/lib/modules/minifySvg.js +6 -12
- package/lib/modules/minifyUrls.js +50 -15
- package/lib/modules/normalizeAttributeValues.js +48 -0
- package/lib/modules/removeComments.js +25 -1
- package/lib/modules/removeEmptyAttributes.js +52 -8
- package/lib/modules/removeRedundantAttributes.js +69 -14
- package/lib/presets/safe.js +9 -4
- package/package.json +18 -16
- package/test.js +25 -16
- package/uncss-fork.patch +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@ 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
|
+
## [1.1.1] - 2021-09-19
|
|
7
|
+
This version fixes fatal errors introduced in [1.1.0].
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.1.0] - 2021-09-19
|
|
11
|
+
*This version contains fatal errors. Please use [1.1.1] instead.*
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- Collapse missing value default attribute in `removeRedundantAttributes` [#158].
|
|
15
|
+
- New `normalizeAttributeValues` module to normalize casing of attribute values [#163].
|
|
16
|
+
- Custom matcher for `removeComments` [#156].
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Remove more empty attributes in `removeEmptyAttributes` [#161].
|
|
20
|
+
- Enhance collapse whitespace in `collapseWhitespace` [#145].
|
|
21
|
+
- `minifyJs` and `minifyUrls` enhancement [#159].
|
|
22
|
+
- Enhance attribute collapse whitespace in `collapseAttributeWhitespace` [#157].
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [1.0.1] - 2021-09-11
|
|
27
|
+
### Added
|
|
28
|
+
- Support of [@novaatwarren/uncss](https://github.com/novaatwarren/uncss) fork [#154]
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- SVGO plugins configuration [#153]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## [1.0.0] - 2021-04-17
|
|
36
|
+
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 🎉
|
|
37
|
+
|
|
38
|
+
It doesn't contain anything new from the previous [0.2.9](https://github.com/posthtml/htmlnano/releases/tag/0.2.9) release.
|
|
39
|
+
We just did a major upgrade of two dependencies: [PurgeCSS](https://purgecss.com/) and [SVGO](https://github.com/svg/svgo),
|
|
40
|
+
which changed their config format.
|
|
41
|
+
Thus we have to do a major release of `htmlnano`.
|
|
42
|
+
|
|
43
|
+
You can safely upgrade to `htmlnano@1.0.0` if you don't pass any config to `minifySvg` or `removeUnusedCss` (while used with PurgeCSS) modules.
|
|
44
|
+
Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https://github.com/FullHuman/purgecss/releases/tag/v3.0.0) and [SVGO@2](https://github.com/svg/svgo/releases/tag/v2.0.0) config format.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
6
48
|
## [0.2.9] - 2021-04-11
|
|
7
49
|
### Added
|
|
8
50
|
- `minifyConditionalComment` support `<html>` [#125].
|
|
@@ -183,6 +225,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
183
225
|
- Remove attributes that contains only white spaces.
|
|
184
226
|
|
|
185
227
|
|
|
228
|
+
[1.1.1]: https://github.com/posthtml/htmlnano/compare/1.1.0...1.1.1
|
|
229
|
+
[1.1.0]: https://github.com/posthtml/htmlnano/compare/1.0.1...1.1.0
|
|
230
|
+
[1.0.1]: https://github.com/posthtml/htmlnano/compare/1.0.0...1.0.1
|
|
231
|
+
[1.0.0]: https://github.com/posthtml/htmlnano/compare/0.2.9...1.0.0
|
|
186
232
|
[0.2.9]: https://github.com/posthtml/htmlnano/compare/0.2.8...0.2.9
|
|
187
233
|
[0.2.8]: https://github.com/posthtml/htmlnano/compare/0.2.7...0.2.8
|
|
188
234
|
[0.2.7]: https://github.com/posthtml/htmlnano/compare/0.2.6...0.2.7
|
|
@@ -204,6 +250,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
204
250
|
[0.1.2]: https://github.com/posthtml/htmlnano/compare/0.1.1...0.1.2
|
|
205
251
|
[0.1.1]: https://github.com/posthtml/htmlnano/compare/0.1.0...0.1.1
|
|
206
252
|
|
|
253
|
+
[#163]: https://github.com/posthtml/htmlnano/issues/163
|
|
254
|
+
[#161]: https://github.com/posthtml/htmlnano/issues/161
|
|
255
|
+
[#159]: https://github.com/posthtml/htmlnano/issues/159
|
|
256
|
+
[#158]: https://github.com/posthtml/htmlnano/issues/158
|
|
257
|
+
[#157]: https://github.com/posthtml/htmlnano/issues/157
|
|
258
|
+
[#156]: https://github.com/posthtml/htmlnano/issues/156
|
|
259
|
+
[#154]: https://github.com/posthtml/htmlnano/issues/154
|
|
260
|
+
[#153]: https://github.com/posthtml/htmlnano/issues/153
|
|
261
|
+
[#145]: https://github.com/posthtml/htmlnano/issues/145
|
|
207
262
|
[#135]: https://github.com/posthtml/htmlnano/issues/135
|
|
208
263
|
[#129]: https://github.com/posthtml/htmlnano/issues/129
|
|
209
264
|
[#125]: https://github.com/posthtml/htmlnano/issues/125
|
|
@@ -217,10 +272,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
217
272
|
[#112]: https://github.com/posthtml/htmlnano/issues/112
|
|
218
273
|
[#111]: https://github.com/posthtml/htmlnano/issues/111
|
|
219
274
|
[#110]: https://github.com/posthtml/htmlnano/issues/110
|
|
220
|
-
[#107]: https://github.com/posthtml/htmlnano/issues/107
|
|
221
275
|
[#108]: https://github.com/posthtml/htmlnano/issues/108
|
|
222
|
-
[#
|
|
276
|
+
[#107]: https://github.com/posthtml/htmlnano/issues/107
|
|
223
277
|
[#104]: https://github.com/posthtml/htmlnano/issues/104
|
|
278
|
+
[#102]: https://github.com/posthtml/htmlnano/issues/102
|
|
224
279
|
[#98]: https://github.com/posthtml/htmlnano/issues/98
|
|
225
280
|
[#95]: https://github.com/posthtml/htmlnano/issues/95
|
|
226
281
|
[#94]: https://github.com/posthtml/htmlnano/issues/94
|