Skip to content

Commit

Permalink
amp optimizer to support ampjs.org (not enabled as default)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerivq committed May 23, 2024
1 parent 39795ea commit 76522bd
Show file tree
Hide file tree
Showing 18 changed files with 293 additions and 208 deletions.
154 changes: 77 additions & 77 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/optimizer/lib/AmpConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const AMP_STORY_DVH_POLYFILL_ATTR = 'amp-story-dvh-polyfill';

module.exports = {
AMP_TAGS: ['amp', '⚡', '⚡4ads', 'amp4ads', '⚡4email', 'amp4email'],
AMP_CACHE_HOST: 'https://cdn.ampproject.org',
AMP_CACHE_HOSTS: ['https://cdn.ampproject.org', 'https://ampjs.org'],
DEFAULT_AMP_CACHE_HOST: 'https://cdn.ampproject.org',
AMP_VALIDATION_RULES_URL: 'https://cdn.ampproject.org/v0/validator.json',
AMP_FORMATS: ['AMP', 'AMP4EMAIL', 'AMP4ADS'],
AMP_RUNTIME_CSS_PATH: '/v0.css',
Expand Down
4 changes: 2 additions & 2 deletions packages/optimizer/lib/RuntimeHostHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
'use strict';

const {AMP_CACHE_HOST, appendRuntimeVersion} = require('./AmpConstants.js');
const {DEFAULT_AMP_CACHE_HOST, appendRuntimeVersion} = require('./AmpConstants.js');

function calculateHost({
ampUrlPrefix = AMP_CACHE_HOST,
ampUrlPrefix = DEFAULT_AMP_CACHE_HOST,
ampRuntimeVersion,
lts = false,
rtv = false,
Expand Down
Loading

0 comments on commit 76522bd

Please sign in to comment.