Closed davinkevin closed 6 years ago
Hi, you can change ENV here: https://github.com/gdg-x/hoverboard/blob/master/index.html#L91
Yeah, but i'm looking for a solution without hard coding it.
From my point of view, this value should be defined to "dev" in source code, but should be change during build operation depending of environment variable. For example, we can detect if the build process is executing in Travis or CI environment and choose to replace dev by prod.
In this case, you have to pass this variable to gulp task and merge with config
variable before nunjucks will compile the files https://github.com/gdg-x/hoverboard/blob/master/gulpfile.js#L54
Now you can do it with https://github.com/gdg-x/hoverboard/tree/hoverboard-v2/config and running proper script https://github.com/gdg-x/hoverboard/blob/hoverboard-v2/package.json#L16
Hi,
We are working with this template and we don't find a way to change the window.ENV without hard-coding it.
Do you plan to handle this feature ? For now, in our project, we add this kind of code as a quick and dirty way to support it :
But I think this is something which should be done during build phase depending of the travis CI env value.
If you are interested about a PR about that, let me know ;)
Linked to https://github.com/GDGToulouse/site-devfest-toulouse-2017/issues/8