Skip to content

feat(create-twilio-function): add deployinfo file to gitignore #320

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

Merged
merged 2 commits into from
Jul 19, 2021

Conversation

philnash
Copy link
Contributor

This change adds .twiliodeployinfo to the default .gitignore. It also refactors createGitignore to fully use streams and callbacks internally, but still return a Promise. More detail on the refactor in the commit message for 6b4ce35.

Fixes #318 and supersedes #319.

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

dkundel and others added 2 commits July 16, 2021 12:33
This change adds .twiliodeployinfo to the default .gitignore

fix #318
Within the createGitignore function we use fs.promises and also createWriteStream and the two aren't particularly compatible. createWriteStream far prefers callbacks and events.

This PR rewrites createGitignore to use callbacks and streams internally returning a Promise for external users.

This also adds the .twiliodeployinfo line to the top of the gitignore file rather than the bottom. This avoids having to open the file twice (gitignore.writeFile will end the write stream when it pipes all the content to it). I think this is the best place to put the addition as it will be where a reader starts looking when they open the gitignore file too.
@philnash philnash requested a review from dkundel July 19, 2021 03:35
@philnash philnash changed the title Philnash/fix 318 feat(create-twilio-function): add deployinfo file to gitignore Jul 19, 2021
@dkundel dkundel merged commit 5ca27b6 into main Jul 19, 2021
@dkundel dkundel deleted the philnash/fix-318 branch July 19, 2021 20:12
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.

Add ..twiliodeployinfo to .gitignore
2 participants