Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include minify_css and minify_js in the public API #66

Closed
Jayman2000 opened this issue Jan 20, 2022 · 1 comment
Closed

Include minify_css and minify_js in the public API #66

Jayman2000 opened this issue Jan 20, 2022 · 1 comment

Comments

@Jayman2000
Copy link

I’m currently creating a Web site for myself, and I have a build script written in Python. The build script uses minify-html. Now that I’ve added CSS to my project, I want to minify it as well. Here’s the problems that I’m running into:

  • There’s a Python wrapper for esbuild, but it’s “[WIP]” and “highly experimental” and it appears to be abandoned (its homepage 404s).
  • Using a separate Python package would be inefficient. There would be two copies of esbuild, one for minify-html and another for the other package.

Here’s why I think it makes sense to include minify_css and minify_js in the public API:

  • Most people probably want to use the same minifier for inline CSS/JS and CSS/JS files. If minify-html switches away from eslint, then most people would probably want to switch with it. Exposing these functions makes staying consistent easy.
  • In some cases (like with Python packages), it results in one less copy of eslint.
  • The functions need to exist anyway, so it (hopefully) wouldn’t be too much of a burden to maintain.
@wilsonzlin
Copy link
Owner

See the comment on #67.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants