Skip to content

Commit

Permalink
Release 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
maltsev committed Sep 11, 2021
1 parent c7e6b53 commit d2a6a8d
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 🎉

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
21 changes: 21 additions & 0 deletions docs/versioned_docs/version-1.0.1/030-config.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
},
},
},
}
])
]
}
});
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version-1.0.0/tutorialSidebar": [
"version-1.0.1/tutorialSidebar": [
{
"type": "autogenerated",
"dirName": "."
Expand Down
2 changes: 1 addition & 1 deletion docs/versions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[
"1.0.0"
"1.0.1"
]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <maltsevkirill@gmail.com>",
Expand Down

0 comments on commit d2a6a8d

Please sign in to comment.