Skip to content

Commit

Permalink
🏗 Remove extraGlobs option (#37589)
Browse files Browse the repository at this point in the history
It hasn't been used anywhere since we migrated to esbuild.
  • Loading branch information
alanorozco committed Feb 8, 2022
1 parent b7a3e17 commit 1d8443e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 0 additions & 2 deletions build-system/compile/bundles.config.js
Expand Up @@ -122,7 +122,6 @@ exports.jsBundles = {
toName: 'amp-viewer-host.max.js',
minifiedName: 'amp-viewer-host.js',
incudePolyfills: true,
extraGlobs: ['extensions/amp-viewer-integration/**/*.js'],
skipUnknownDepsCheck: true,
},
},
Expand Down Expand Up @@ -197,7 +196,6 @@ exports.jsBundles = {
toName: 'amp-inabox.js',
minifiedName: 'amp4ads-v0.js',
includePolyfills: true,
extraGlobs: ['src/inabox/*.js', '3p/iframe-messaging-client.js'],
},
},
};
Expand Down
5 changes: 0 additions & 5 deletions build-system/tasks/dist.js
Expand Up @@ -205,10 +205,6 @@ function buildLoginDone(version) {
minify: true,
minifiedName,
aliasName,
extraGlobs: [
`${buildDir}/amp-login-done-0.1.max.js`,
`${buildDir}/amp-login-done-dialog.js`,
],
});
}

Expand All @@ -228,7 +224,6 @@ async function buildWebPushPublisherFiles() {
includePolyfills: true,
minify: true,
minifiedName,
extraGlobs: [`${tempBuildDir}/*.js`],
});
}
}
Expand Down
9 changes: 2 additions & 7 deletions build-system/tasks/extension-helpers.js
Expand Up @@ -88,7 +88,6 @@ const DEFAULT_EXTENSION_SET = ['amp-loader', 'amp-auto-lightbox'];
* version?: string,
* hasCss?: boolean,
* loadPriority?: string,
* extraGlobs?: Array<string>,
* binaries?: Array<ExtensionBinaryDef>,
* npm?: boolean,
* wrapper?: string,
Expand Down Expand Up @@ -365,7 +364,7 @@ async function doBuildExtension(extensions, extension, options) {
const e = extensions[extension];
let o = {...options};
o = Object.assign(o, e);
await buildExtension(e.name, e.version, e.hasCss, o, e.extraGlobs);
await buildExtension(e.name, e.version, e.hasCss, o);
}

/**
Expand Down Expand Up @@ -417,12 +416,10 @@ async function watchExtension(extDir, name, version, hasCss, options) {
* the sub directory inside the extension directory
* @param {boolean} hasCss Whether there is a CSS file for this extension.
* @param {?Object} options
* @param {!Array=} extraGlobs
* @return {!Promise<void>}
*/
async function buildExtension(name, version, hasCss, options, extraGlobs) {
async function buildExtension(name, version, hasCss, options) {
options = options || {};
options.extraGlobs = extraGlobs;
if (options.compileOnlyCss && !hasCss) {
return;
}
Expand Down Expand Up @@ -679,8 +676,6 @@ async function buildBentoExtensionJs(dir, name, options) {
? 'bento-element-minified'
: 'bento-element-unminified',
filename: await getBentoBuildFilename(dir, name, 'standalone', options),
// Include extension directory since our entrypoint may be elsewhere.
extraGlobs: [...(options.extraGlobs || []), `${dir}/**/*.js`],
});
}

Expand Down

0 comments on commit 1d8443e

Please sign in to comment.