Skip to content

Commit

Permalink
feat(transformers): use html-crush instead of html-minifier
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Apr 4, 2020
1 parent 62247bc commit 094d03b
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 87 deletions.
171 changes: 87 additions & 84 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"front-matter": "^3.0.2",
"fs-extra": "^8.1.0",
"glob-promise": "^3.4.0",
"html-minifier": "^4.0.0",
"html-crush": "^1.9.24",
"is-url-superb": "^3.0.0",
"juice": "^6.0.0",
"ora": "^4.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/transformers/minify.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { minify } = require('html-minifier')
const { crush } = require('html-crush')

module.exports = async (html, config) => {
if (config.minify && config.minify.enabled) {
return minify(html, config.minify)
html = crush(html, config.minify).result
}

return html
Expand Down

0 comments on commit 094d03b

Please sign in to comment.