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

Astro adapter proof of concept #7210

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Yuangwang
Copy link
Contributor

@Yuangwang Yuangwang commented May 22, 2024

Description

Have the web frameworks astro framework support be pulled in from the apphosting adapter.

This is the companion pr for FirebaseExtended/firebase-framework-tools#195, FirebaseExtended/firebase-framework-tools#195 should be merged in before this current pr is merged in

Scenarios Tested

Sample Commands

Comment on lines 29 to 37
let bundleConfig: BundleConfig;
async function getBundleConfigs(cwd: string): Promise<BundleConfig> {
if (bundleConfig) {
return bundleConfig;
}

const fileContents = await readFile(join(cwd, ".apphosting", "bundle.yaml"), "utf8");
return load(fileContents);
}
Copy link
Member

Choose a reason for hiding this comment

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

should we have this at frameworks/utils or it can be framework specific?

Comment on lines 49 to 51
for (const assetPath of bundleConfigs.staticAssets) {
await copy(assetPath, dest);
}
Copy link
Member

Choose a reason for hiding this comment

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

probably better to Promise.all?

Suggested change
for (const assetPath of bundleConfigs.staticAssets) {
await copy(assetPath, dest);
}
await Promise.all(bundleConfigs.staticAssets.map((assetPath) => copy(assetPath, dest)));

const packageJson = await readJSON(join(sourceDir, "package.json"));
await copy(join(sourceDir, outDir, "server"), join(destDir));
if (bundleConfigs.serverDirectory != null) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (bundleConfigs.serverDirectory != null) {
if (bundleConfigs.serverDirectory) {

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.

None yet

2 participants