-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: add health variant & centralise assetVariant switch #1821
Conversation
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.
lgtm!
Thanks for centralising the switch, it is much cleaner than before. Also, great work on finding and ironing out the bugs in tests and Sentry with the default gov
variant!
lgtm! Mind sharing the thought process behind moving webpack stuff (compile/transpile-time) away from dev-dependencies? minor nitpicking that we can examine in the future:
|
Replying to this for future documentation: After a short discussion, these concerns have been resolved, reasons below:
|
Problem
What problem are you trying to solve? What issue does this close?
In preparation for the new GoGovSG stack targeted at healthcare providers, a new
health
variant needs to be set up to serve the appropriate assets and color themes.Additionally, the
assetVariant
environment variable controls which variant of the GoGovSG application is being built. However, it is repeatedly imported in multiple places, which may introduce unintended bugs or issues that are hard to track down due to the multiple points of failure.Closes #1812
Solution
How did you solve the problem?
This PR duplicates assets from the
gov
andedu
variants to create placeholder assets for thehealth
variant, which should be replaced when the actual assets and design for the variant are finished. Moreover, it also centralizes theassetVariant
env var import, which is then imported by other files, which ensures that there is only a single point where the environmental variable is read and processed for use in other files.Features:
health
variant to the codebaseImprovements:
assetVariant
environment variable switchgov
variant thatassetVariant
defaults to when no value for the environment variable is providedBug Fixes:
assetVariant
valueTests
Deploy Notes
Notes regarding deployment of the contained body of work. These should note any
new dependencies, new scripts, etc.
Note: This PR moves several dev dependencies to be normal dependencies as listed below:
webpack
@sentry/webpack-plugin
clean-webpack-plugin
html-webpack-plugin
New dev dependencies:
ts-node
: required to use a typescript webpack configuration file