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

💅 / 🏗 Create new binary for compiler #compiler #35137

Merged
merged 3 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions build-system/compile/bundles.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ exports.jsBundles = {
includePolyfills: true,
},
},
'compiler.js': {
srcDir: './src/compiler/',
Copy link
Contributor

Choose a reason for hiding this comment

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

🚲 🏚️ ing time! Do these binaries get served on the CDN?

Copy link
Member Author

@samouri samouri Jul 7, 2021

Choose a reason for hiding this comment

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

I believe so! In this case it would be at https://cdn.ampproject.org/compiler.js as the url.

srcFilename: 'index.js',
destDir: './dist',
minifiedDestDir: './dist',
options: {
minifiedName: 'compiler.js',
},
},
'amp-viewer-host.max.js': {
srcDir: './extensions/amp-viewer-integration/0.1/examples/',
srcFilename: 'amp-viewer-host.js',
Expand Down
1 change: 1 addition & 0 deletions build-system/tasks/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ async function compileAllJs(options) {
doBuildJs(jsBundles, 'iframe-transport-client-lib.js', options),
doBuildJs(jsBundles, 'recaptcha.js', options),
doBuildJs(jsBundles, 'amp-viewer-host.max.js', options),
doBuildJs(jsBundles, 'compiler.js', options),
doBuildJs(jsBundles, 'video-iframe-integration.js', options),
doBuildJs(jsBundles, 'amp-story-entry-point.js', options),
doBuildJs(jsBundles, 'amp-story-player.js', options),
Expand Down
5 changes: 5 additions & 0 deletions src/compiler/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function compile(html) {
return html;
}

globalThis.compile = compile;