-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Retire try.html and various frontend cleanup #1194
Conversation
Makefile
Outdated
cat frontend/fragments/try-header.html build/badge-examples-fragment.html frontend/fragments/try-footer.html > try.html && \ | ||
cat try.html | $(SED) "s,(<img src=')(/[^'\?]+)',\1https://img.shields.io\2?maxAge=2592000'," \ | ||
cat frontend/fragments/try-header.html build/badge-examples-fragment.html frontend/fragments/try-footer.html \ | ||
| $(SED) "s,(<img src=')(/[^'\?]+)',\1https://img.shields.io\2?maxAge=2592000'," \ | ||
| $(SED) "s,(<img src=')(/[^'\?]+\?[^']+)',\1https://img.shields.io\2\&maxAge=2592000'," \ | ||
| $(SED) "s,<span id='imgUrlPrefix'>,&https://img.shields.io," \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to make handle this in code, with a flag that indicates a dev or production build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's clear that a flag needs to happen before this can be merged. These sed transforms shouldn't happen in development.
# Conflicts: # Makefile # try.html
- Move config for badge examples into the JS build - Move the prod transform into npm scripts - I had trouble setting environment variables in make, and while I don’t love this it seems simpler than wrestling with make. - In the future this could be handled using a bundler plugin - make website builds production build as before
- It’s portable and tested, and sed in the package.json is not
This is looking pretty good to me. |
Followup from #1163