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

Update Gulpfile to copy files required for generated client to properly run #1353

Merged
merged 3 commits into from
Jul 2, 2021

Conversation

maceonthompson
Copy link

npm run build etc. will now copy over the the .d.ts and .json files found in generated/messaging. Before, this didn't happen, and the generated client would error on runtime.

'src/**/protos/*.json',
// This isn't ideal, but doing something like
// 'src/generated/**/*.json' results in incorrect paths in the /lib dir
'src/**/*.json'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we say src/generated/**/*.json instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see. It ends up copying them into lib/messaging instead of lib/generated/messaging. I guess it only matches path segments after src/generated when the pattern is specified this way. Then I think the way you've implemented this is correct.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, doing the more general wildcard is less "comfortable" than doing the specific src/generated/**/*.json, but it's (as far as I could tell) the only way for the generated path to be structured properly.

gulpfile.js Outdated Show resolved Hide resolved
Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@maceonthompson maceonthompson merged commit 1ffae15 into maceo-fcm-gapic-client Jul 2, 2021
@maceonthompson maceonthompson deleted the maceo-fcm-gapic-gulpfile branch July 2, 2021 18:21
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