Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use go:embed for prelude JS snippets #1200

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

Merged
merged 2 commits into from
Jun 11, 2023
Merged

Use go:embed for prelude JS snippets #1200

merged 2 commits into from
Jun 11, 2023

Conversation

flimzy
Copy link
Member

@flimzy flimzy commented Jun 11, 2023

The main advantage to this specific PR is that it allows for easier JS editor/IDE support when editing JS. As a follow-up, I'll work on eliminating the go:generate step for minification as well.

@github-actions
Copy link

Reference app: jQuery TodoMVC (acf500a6c32a83d8c4582d967b09a65febf0e120)

BRANCH ORIGINAL MINIFIED COMPRESSED (GZIP)
Pull request (embedPrelude) 2,948,040 bytes 1,932,752 bytes 382,352 bytes
Target branch (master) 0.39% increase (11,351 bytes) 0.00% increase (0 bytes) 0.00% increase (0 bytes)

#outputSize

@flimzy
Copy link
Member Author

flimzy commented Jun 11, 2023

0.39% increase (11,351 bytes)

This appears to be the result of different indentation as enforced by my editor when saving *.js files. We may want to alter this formatting, and add some eslint/prettier rules over time.

@nevkontakte
Copy link
Member

Yeah, I'm not worried about size increase in the non-minified version, I doubt anyone uses it in production. I think adding a common prettier config would be a good thing to make sure that all contributors follow the same format.

@nevkontakte nevkontakte merged commit 1cd471b into master Jun 11, 2023
@flimzy flimzy deleted the embedPrelude branch June 11, 2023 19:59
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.

2 participants