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

add version to ModeDef #2918

Merged
merged 1 commit into from
Apr 18, 2016
Merged

Conversation

erwinmombay
Copy link
Member

@erwinmombay erwinmombay commented Apr 15, 2016

Closes #2874

@erwinmombay
Copy link
Member Author

@cramforce PTAL

return {
localDev: isLocalDev,
// Triggers validation
development: developmentQuery['development'] == '1' || window.AMP_DEV_MODE,
minified: process.env.NODE_ENV == 'production',
test: window.AMP_TEST,
log: developmentQuery['log'],
version: version,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove this. We version lock the child frame, so it can read this itself, and we need to be careful with the URL length.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, will rename fullVersion to just version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@erwinmombay erwinmombay force-pushed the pass-full-version branch 3 times, most recently from 5985219 to 90c3b15 Compare April 15, 2016 17:17
return win.AMP_CONFIG.fullVersion;
}

const selector = 'script[src$="/v0.js"]';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do we need this code path?

Copy link
Member Author

@erwinmombay erwinmombay Apr 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so right now we don't have win.AMP_CONFIG.fullVersion so this is to look for v0.js and read the version from the script tags src when the page is on the cache. I should implement #2917 by EOD. so you're right im not sure we need it. let me know what you think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

added win.AMP_CONFIG.v during build

@erwinmombay erwinmombay force-pushed the pass-full-version branch 2 times, most recently from 88607b5 to 8d1cf11 Compare April 18, 2016 09:09
@erwinmombay
Copy link
Member Author

@cramforce PTAL

@erwinmombay erwinmombay changed the title add version and fullVersion to ModeDef add version to ModeDef Apr 18, 2016
@cramforce
Copy link
Member

LGTM

@erwinmombay erwinmombay merged commit b489b8d into ampproject:master Apr 18, 2016
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

Successfully merging this pull request may close these issues.

2 participants