Skip to content
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

Change globalVarName with environment variable? #15

Open
holms opened this issue May 20, 2021 · 3 comments
Open

Change globalVarName with environment variable? #15

holms opened this issue May 20, 2021 · 3 comments

Comments

@holms
Copy link

holms commented May 20, 2021

I saw this option to change globalVarName in here , but this requires some intervention into a code. While my goal is to build prebid.js with this build generator. Is there's any way to change globalVarName by some environment variable when launching Dockerfiles or some similar option? If not, maybe I could send a PR for this? Also some guidance would really heavily help a lot, because currently I have no idea where to start from. The only guess I have is to modify package.json right after git repo checked out in checkout.sh.

@holms
Copy link
Author

holms commented Jul 1, 2021

@bretg would it work if i sent PR with a sed command where git checkout is happening? I also can add if statement to check if env var is set in order to pass custom globalVarName

@bretg
Copy link
Contributor

bretg commented Jul 1, 2021

@holms - please start with your requirements. I don't have technical knowledge of this system so would have to assign an engineer to consult on approaches. I'm not doing that until we're convinced this is a useful feature.

What exactly are you looking to do? Do you envision that the PBJS Download page gets an optional field to define the global? And that value propagates through to the build?

What's the use case? We do not recommend (or support) running multiple PBJS instances concurrently. The PBJS download tool is meant to be a simple tool for those without the technical skill to run a build on the command line.

I've really need to generate prebid.js with my own globalVarName.

Since this is the case, you've been doing it on the command line. Please explain why that's not working for you.

@bretg
Copy link
Contributor

bretg commented Jul 19, 2021

The main issue here @holms is that the "easy button" download page has everything pre-built, dynamically sewing named modules together.

Seems to me that changing the global may force a need to build a custom version, which is something I really want to avoid.

  • we had timeout trouble with the browser waiting for a custom build to complete. Which means we'll probably need to (re)build an email system where it emails a link.
  • which means we also have to deal with cleaning up disk space after a certain amount of time.

Maybe there's a way to hack the $$PREBID_GLOBAL$$ on the way out so we don't have to run a build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants