-
Notifications
You must be signed in to change notification settings - Fork 917
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
base: master
Are you sure you want to change the base?
Conversation
src/frameworks/astro/index.ts
Outdated
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); | ||
} |
There was a problem hiding this comment.
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?
src/frameworks/astro/index.ts
Outdated
for (const assetPath of bundleConfigs.staticAssets) { | ||
await copy(assetPath, dest); | ||
} |
There was a problem hiding this comment.
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?
for (const assetPath of bundleConfigs.staticAssets) { | |
await copy(assetPath, dest); | |
} | |
await Promise.all(bundleConfigs.staticAssets.map((assetPath) => copy(assetPath, dest))); |
src/frameworks/astro/index.ts
Outdated
const packageJson = await readJSON(join(sourceDir, "package.json")); | ||
await copy(join(sourceDir, outDir, "server"), join(destDir)); | ||
if (bundleConfigs.serverDirectory != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (bundleConfigs.serverDirectory != null) { | |
if (bundleConfigs.serverDirectory) { |
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