You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to talk about handling variable that are environment specific in aurelia.
the way that we handle it now, is by having multiple json files in an environment folder,
when we start a build process - one of those files is copied into the src folder, and gets bundled with the rest of the app.
you can dictate witch file is copied by specifying the "--env" flag while building.
in those files, you can put whatever you want - so it's an easy way to have variables that differ between environments.
I see 2 different kind of variables that can go into those config files.
build time variables: variables that affect the build - (e.g minifying the code, enabling/disabling logging, enabling/disabling sourcemap etc.). setting different values in those variables should result in different build output.
run time variables: variable that affect the application - (e.g api url endpoints, api keys, ticket duration etc) setting different values in those variables should not affect the build output.
one may change those values even after the build and expect the app to consider the new values.
this is currently cannot be done because the config file is bundled along with the application.
any change to the config must also come with a new build.
the current way of handling config files has another problems/limitations:
it's annoying to have a file in the src folder - that should not be committed into the source control.
TFS adds readlony attributes to all the files that he manages - so copying one of the config files work only once, the next time you try to build - the file cannot be overwritten because of the readonly flag. Readonly attribute on environment scipt file #1031
what can we do about this?
how does other framework handle config files?
can we have 2 sort of configs? one for build time variables? and another for run time variables?
can we even have files that are left outside of the bundle for easy editing?
can we skip the part where we copy the file into src?
The text was updated successfully, but these errors were encountered:
💬 RFC
I want to talk about handling variable that are
environment
specific in aurelia.the way that we handle it now, is by having multiple
json
files in anenvironment
folder,when we start a build process - one of those files is copied into the
src
folder, and gets bundled with the rest of the app.you can dictate witch file is copied by specifying the "--env" flag while building.
in those files, you can put whatever you want - so it's an easy way to have
variables
that differ between environments.I see 2 different kind of variables that can go into those config files.
setting different values in those variables should result in different build output.
setting different values in those variables should not affect the build output.
one may change those values even after the build and expect the app to consider the new values.
this is currently cannot be done because the config file is bundled along with the application.
any change to the config must also come with a new build.
the current way of handling config files has another problems/limitations:
src
folder - that should not be committed into the source control.readlony
attributes to all the files that he manages - so copying one of the config files work only once, the next time you try to build - the file cannot be overwritten because of thereadonly
flag. Readonly attribute on environment scipt file #1031what can we do about this?
how does other framework handle config files?
can we have 2 sort of configs? one for build time variables? and another for run time variables?
can we even have files that are left outside of the bundle for easy editing?
can we skip the part where we copy the file into
src
?The text was updated successfully, but these errors were encountered: