terser / html-minifier-terser

actively maintained fork of html-minifier - minify HTML, CSS and JS code using terser - supports ES6 code
https://terser.org/html-minifier-terser
MIT License
376 stars 30 forks source link

Terser 5 #63

Closed sibiraj-s closed 3 years ago

sibiraj-s commented 3 years ago

Closes #46

DanielRuf commented 3 years ago

Hi @sibiraj-s,

thanks for this awesome PR. Can you please revert the changes to the dist files and to the package-lock.json file? Because these are only updates for releases by the team.

Thank you.

sibiraj-s commented 3 years ago

Sure.

revert changes to. package-lock.json

you mean to npm v6?

revert dist

shall I add it to gitignore?

DanielRuf commented 3 years ago

shall I add it to gitignore?

No. Since it is already tracked (in the repo) gitignore will not do much here. Just reset the dist file on your branch to the original version in the repo.

you mean to npm v6?

No, package-lock.json (the lockfile) is automatically updated on npm i and is only updated by the maintainers for each release. The package.json is ok.

DanielRuf commented 3 years ago

Just as an information for the next release: since this PR contains major changes this requires a new major release of the package.

sibiraj-s commented 3 years ago

done @DanielRuf

sibiraj-s commented 3 years ago

Forgot to mention. I don't see the mentions/usage/tests of HTMLtoDOM and HTMLtoXML anywhere. They should be updated as well, since HTMLParser is now async.

The api will change entirely.

new HTMLtoDOM() // won't work

Either it has to be a plain function htmlToDom() or a class constructor. any recommendations?

DanielRuf commented 3 years ago

We have a few conflicts now due to another merged PR. Can you take a look and fix these @sibiraj-s? That would be relly great, thank you.

sibiraj-s commented 3 years ago

We have a few conflicts now due to another merged PR. Can you take a look and fix these @sibiraj-s? That would be relly great, thank you.

done

DanielRuf commented 3 years ago

Great, thanks.

Unfortunately there are the dist files committed again. Can you remove them?

sibiraj-s commented 3 years ago

Great, thanks.

Unfortunately there are the dist files committed again. Can you remove them?

done. didn't notice it. generated while running tests.

DanielRuf commented 3 years ago

Do we have to update the documentation because we use now async @sibiraj-s?

sibiraj-s commented 3 years ago

I have updated the readme's usage section, that should do for now.

alexander-akait commented 3 years ago

/cc @DanielRuf friendly ping, many modules still depend on this, will be great to get terser v5 support + allow to run async functions

DanielRuf commented 3 years ago

/cc @DanielRuf friendly ping, many modules still depend on this, will be great to get terser v5 support + allow to run async functions

Thank you for the ping. Sorry that I have let you wait.

DanielRuf commented 3 years ago

html-minifier-terser v6.0.0 has been released now: https://www.npmjs.com/package/html-minifier-terser

If someone wants to help with the changelog, that would be great.

https://github.com/terser/html-minifier-terser/releases/tag/v6.0.0