-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Write local testing config values to AMP runtime #12152
Conversation
/to @erwinmombay @bradfrizzell for review. |
* @param {string} opt_local | ||
* @param {string=} opt_branch | ||
* @param {string} filename File containing the config | ||
* @param {string} opt_localBranch Whether to use the local branch version |
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.
if this is actually opt then add =
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.
Done.
* @param {string} config Prod or canary | ||
* @param {string} target File containing the AMP runtime (amp.js or v0.js) | ||
* @param {string} filename File containing the (prod or canary) config | ||
* @param {boolean} opt_localDev Whether to enable local development |
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.
missing =
on these optional params
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.
Done.
@erwinmombay Will merge this shortly, unless you have more comments. |
This PR does the following:
localDev: true
,thirdPartyFrameHost
, andthirdPartyFrameRegex
are written to the local AMP config to enable local testing withgulp build
andgulp dist --fortesting
.--local_dev
togulp prepend-global
, which will ensure that the AMP runtime is set up for local development and testing.With this,
localDev
will be set to true when the runtime is built and served onlocalhost
viagulp
, or via the following commands:In addition,
localDev
will be set to true andthirdPartyFrameHost
andthirdPartyFrameRegex
will point toAMP_TESTING_HOST
when the runtime is built and served from a non-localhost server, via the following commands.Partial fix for #12054