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

Add --stdin support #9

Closed
zimbatm opened this issue Jan 18, 2021 · 1 comment
Closed

Add --stdin support #9

zimbatm opened this issue Jan 18, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@zimbatm
Copy link
Member

zimbatm commented Jan 18, 2021

Mostly needed for editor integration.

When prjfmt is executed with the --stdin argument, it will read the content from stdin.

This is a different running mode. It needs to check that only one file path is being passed as an argument, or fail with a relevant error message. This is only used to check the format of the stdin file.

A new running function needs to be added, that reads all the content from stdin and writes it in a tmpfile. Ideally the tmpfile has the same extension as the passed-in path. Then use the standard formatter interface to format that file. Once finished, read back the temporary file and pipe it to stdout.

Depends on #7 to avoid posting formatter outputs on stdout.

@Rizary Rizary self-assigned this Jan 26, 2021
@zimbatm zimbatm added the enhancement New feature or request label Jan 26, 2021
@zimbatm zimbatm added this to the Release 0.2 milestone Feb 27, 2021
@zimbatm
Copy link
Member Author

zimbatm commented Mar 5, 2021

Fixed by #95

@zimbatm zimbatm closed this as completed Mar 5, 2021
brianmcgee added a commit that referenced this issue May 13, 2024
brianmcgee added a commit that referenced this issue May 13, 2024
fix: install node dependencies in devshell commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants