-
Notifications
You must be signed in to change notification settings - Fork 479
Make manifest.env
available in publish and export commands
#540
Conversation
hey there! sorry nobody got back to you on this. i think i would suggest using babel-plugin-inline-environment-variables instead of building similar functionality into expo-cli. open to be convinced, but i'll close this pr for now until i am convinced :) |
Hi Brent,
I appreciate the attention, In my defens `expo start` already has this
functionality available, I am just trying to make the same for other
commands.
This make the expo more `Twelve-Factor`ish and enable publishing different
configuration to separate release channels more easily.
Em sex, 6 de dez de 2019 às 20:18, Brent Vatne <[email protected]>
escreveu:
… hey there! sorry nobody got back to you on this.
i think i would suggest using babel-plugin-inline-environment-variables
<https://babeljs.io/docs/en/babel-plugin-transform-inline-environment-variables>
instead of building similar functionality into expo-cli. open to be
convinced, but i'll close this pr for now until i am convinced :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#540?email_source=notifications&email_token=AAAFUHR5DSKTCI5E4FANBD3QXLMURA5CNFSM4HH5V2D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGFU6JI#issuecomment-562777893>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFUHQONCTYFFFJVZAEU6TQXLMURANCNFSM4HH5V2DQ>
.
|
i'm not crazy about this existing on |
ok i think this is reasonable to include. really sorry for the delay and back and forth on it. if you can resolve conflicts then i'll happily merge it. thanks @rodrigorm! |
55d21a0
to
1397261
Compare
1397261
to
ae431c5
Compare
@brentvatne resolved the conflicts, but I am not sure if it is all working because the packages structure changed since my PR is open. Can you help me with the tests to verify the expected changes is working? |
hey @rodrigorm - thank you! I'll get back to you on this after the holiday |
the change that you made should work fine, but i've thought about this more and i don't think that this is a safe change for us to make without some additional work. it's quite possible that some folks have environment variables with i think an allow list (aka whitelist) rather than block list (aka blacklist) in app.json might be a safer way to expose environment variables. alternatively, we could put this behind an explicit flag or app.json config option |
@brentvatne you are right, variables like |
closing this for now, will follow up in #1435 when #1342 is ready :) thank you for the insights @rodrigorm! |
Make
process.env
variables available inmanifest.env
inexpo publish
andexpo export
commands like inexpo start
allowing a project to have aapp.json
with settings which can be set using environment variables, eg:In
app.json
:In
src/App.js
: