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

accepting default app.yaml file #176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haewoniee
Copy link

@haewoniee haewoniee commented Apr 17, 2024

@haewoniee haewoniee force-pushed the feature/default-app-yaml-file branch from a176d3e to 624679a Compare April 17, 2024 04:12
Copy link
Owner

@HalfdanJ HalfdanJ left a comment

Choose a reason for hiding this comment

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

Thanks for adding this feature!
Can you also update the readme with the new configuration option.

@@ -15,6 +15,7 @@ export default function entrypoint(options = {}) {
useCloudTracing = false,
dependencies = {},
nodejsRuntime = 18,
defaultYamlFile = "app.yaml"
Copy link
Owner

Choose a reason for hiding this comment

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

I think it would make more sense to name the parameter something like 'appYamlFile' and not default, since the config overrides the default (which is app.yaml)

if (existsSync("app.yaml")) {
builder.log.minor("Existing app.yaml found");
yaml = YAML.parse(readFileSync("app.yaml").toString());
if (existsSync(defaultYamlFile)) {
Copy link
Owner

Choose a reason for hiding this comment

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

If a yaml file is specified i think the code should throw an error if the file is not found, otherwise it can probably be a bit confusing

Copy link
Owner

Choose a reason for hiding this comment

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

Although that might be a bit more complicated to get right. I'm fine either way

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.

2 participants