From d2a6a8de1b313ce89c252a0c1537349926554405 Mon Sep 17 00:00:00 2001 From: Kirill Maltsev Date: Sat, 11 Sep 2021 10:30:04 +0300 Subject: [PATCH] Release 1.0.1 --- CHANGELOG.md | 12 +++++++++++ .../010-introduction.md | 0 .../020-usage.md | 0 .../version-1.0.1/030-config.md | 21 +++++++++++++++++++ .../040-presets.md | 0 .../050-modules.md | 14 ++++++++----- .../060-contribute.md | 0 ...ebars.json => version-1.0.1-sidebars.json} | 2 +- docs/versions.json | 2 +- package.json | 2 +- 10 files changed, 45 insertions(+), 8 deletions(-) rename docs/versioned_docs/{version-1.0.0 => version-1.0.1}/010-introduction.md (100%) rename docs/versioned_docs/{version-1.0.0 => version-1.0.1}/020-usage.md (100%) create mode 100644 docs/versioned_docs/version-1.0.1/030-config.md rename docs/versioned_docs/{version-1.0.0 => version-1.0.1}/040-presets.md (100%) rename docs/versioned_docs/{version-1.0.0 => version-1.0.1}/050-modules.md (98%) rename docs/versioned_docs/{version-1.0.0 => version-1.0.1}/060-contribute.md (100%) rename docs/versioned_sidebars/{version-1.0.0-sidebars.json => version-1.0.1-sidebars.json} (66%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4993c7e..ff63c14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.0.1] - 2021-09-11 +### Added +- Support of [@novaatwarren/uncss](https://github.com/novaatwarren/uncss) fork [#154] + +### Changed +- SVGO plugins configuration [#153] + + + ## [1.0.0] - 2021-04-17 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 🎉 @@ -196,6 +205,7 @@ Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https: - Remove attributes that contains only white spaces. +[1.0.1]: https://github.com/posthtml/htmlnano/compare/1.0.0...1.0.1 [1.0.0]: https://github.com/posthtml/htmlnano/compare/0.2.9...1.0.0 [0.2.9]: https://github.com/posthtml/htmlnano/compare/0.2.8...0.2.9 [0.2.8]: https://github.com/posthtml/htmlnano/compare/0.2.7...0.2.8 @@ -218,6 +228,8 @@ Otherwise, you have to adapt the config according to the new [PurgeCSS@3](https: [0.1.2]: https://github.com/posthtml/htmlnano/compare/0.1.1...0.1.2 [0.1.1]: https://github.com/posthtml/htmlnano/compare/0.1.0...0.1.1 +[#154]: https://github.com/posthtml/htmlnano/issues/154 +[#153]: https://github.com/posthtml/htmlnano/issues/153 [#135]: https://github.com/posthtml/htmlnano/issues/135 [#129]: https://github.com/posthtml/htmlnano/issues/129 [#125]: https://github.com/posthtml/htmlnano/issues/125 diff --git a/docs/versioned_docs/version-1.0.0/010-introduction.md b/docs/versioned_docs/version-1.0.1/010-introduction.md similarity index 100% rename from docs/versioned_docs/version-1.0.0/010-introduction.md rename to docs/versioned_docs/version-1.0.1/010-introduction.md diff --git a/docs/versioned_docs/version-1.0.0/020-usage.md b/docs/versioned_docs/version-1.0.1/020-usage.md similarity index 100% rename from docs/versioned_docs/version-1.0.0/020-usage.md rename to docs/versioned_docs/version-1.0.1/020-usage.md diff --git a/docs/versioned_docs/version-1.0.1/030-config.md b/docs/versioned_docs/version-1.0.1/030-config.md new file mode 100644 index 0000000..e906b98 --- /dev/null +++ b/docs/versioned_docs/version-1.0.1/030-config.md @@ -0,0 +1,21 @@ +# Config + +There are two main ways to configure htmlnano: + +## Passing options to `htmlnano` directly +This is the way described above in the examples. + +## Using configuration file +Alternatively, you might create a configuration file (e.g., `htmlanorc.json` or `htmlnanorc.js`) or save options to `package.json` with `htmlnano` key. +`htmlnano` uses `cosmiconfig`, so refer to [its documentation](https://github.com/davidtheclark/cosmiconfig/blob/main/README.md) for a more detailed description. + +If you want to specify a preset that way, use `preset` key: + +```json +{ + "preset": "max", +} +``` + +Configuration files have lower precedence than passing options to `htmlnano` directly. +So if you use both ways, then the configuration file would be ignored. \ No newline at end of file diff --git a/docs/versioned_docs/version-1.0.0/040-presets.md b/docs/versioned_docs/version-1.0.1/040-presets.md similarity index 100% rename from docs/versioned_docs/version-1.0.0/040-presets.md rename to docs/versioned_docs/version-1.0.1/040-presets.md diff --git a/docs/versioned_docs/version-1.0.0/050-modules.md b/docs/versioned_docs/version-1.0.1/050-modules.md similarity index 98% rename from docs/versioned_docs/version-1.0.0/050-modules.md rename to docs/versioned_docs/version-1.0.1/050-modules.md index 12b22dc..e402b1b 100644 --- a/docs/versioned_docs/version-1.0.0/050-modules.md +++ b/docs/versioned_docs/version-1.0.1/050-modules.md @@ -328,14 +328,18 @@ SVGO options can be passed directly to the `minifySvg` module: ```js htmlnano.process(html, { minifySvg: { - plugins: extendDefaultPlugins([ + plugins: [ { - name: 'builtinPluginName', + name: 'preset-default', params: { - optionName: 'optionValue' - } + overrides: { + builtinPluginName: { + optionName: 'optionValue' + }, + }, + }, } - ]) + ] } }); ``` diff --git a/docs/versioned_docs/version-1.0.0/060-contribute.md b/docs/versioned_docs/version-1.0.1/060-contribute.md similarity index 100% rename from docs/versioned_docs/version-1.0.0/060-contribute.md rename to docs/versioned_docs/version-1.0.1/060-contribute.md diff --git a/docs/versioned_sidebars/version-1.0.0-sidebars.json b/docs/versioned_sidebars/version-1.0.1-sidebars.json similarity index 66% rename from docs/versioned_sidebars/version-1.0.0-sidebars.json rename to docs/versioned_sidebars/version-1.0.1-sidebars.json index 9820721..f04a3d5 100644 --- a/docs/versioned_sidebars/version-1.0.0-sidebars.json +++ b/docs/versioned_sidebars/version-1.0.1-sidebars.json @@ -1,5 +1,5 @@ { - "version-1.0.0/tutorialSidebar": [ + "version-1.0.1/tutorialSidebar": [ { "type": "autogenerated", "dirName": "." diff --git a/docs/versions.json b/docs/versions.json index 5e1abcd..4b781f5 100644 --- a/docs/versions.json +++ b/docs/versions.json @@ -1,3 +1,3 @@ [ - "1.0.0" + "1.0.1" ] diff --git a/package.json b/package.json index 7728376..57c8add 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "htmlnano", - "version": "1.0.0", + "version": "1.0.1", "description": "Modular HTML minifier, built on top of the PostHTML", "main": "index.js", "author": "Kirill Maltsev ",