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

Minify assets before publishing #30

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

takase1121
Copy link
Member

@takase1121 takase1121 commented Jan 1, 2023

Added support for minifying assets before publishing.

This is completely optional for developers and website contributors.

You don't need to download node and these packages if you don't want to.

esbuild and postcss are used to minify the js and css files.
esbuild is famous for being really, really fast and in this case it took (in average) 3ms to minify our js file.
postcss is not that fast, but it is still under a second.

The benefit of this approach is that developers doesn't need to concern themselves with the file size; feel free to make your code as readable and use modern syntax.
These modern syntax will then be compiled into compatible code.
Most developers are already using the latest browsers, so their browser can already run those new features; now they don't have to hold back.

I also added autoprefixer to the mix so that developers don't have to write vendor-prefixed css in the future.

Squash if merge.

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 this pull request may close these issues.

1 participant