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

Default output path of nickel doc is unexpected #1656

Closed
gkleen opened this issue Sep 29, 2023 · 2 comments
Closed

Default output path of nickel doc is unexpected #1656

gkleen opened this issue Sep 29, 2023 · 2 comments
Assignees

Comments

@gkleen
Copy link

gkleen commented Sep 29, 2023

I was quite surprised that nickel doc by default wants to write it's output to a file (and accidentally commited one of those output files, even).

I think it would make more sense for nickel doc to emit to stdout by default?

@yannham
Copy link
Member

yannham commented Sep 29, 2023

I think the rationale is that it's more common to generate doc somewhere to then publish it or commit it, while it's more uncommon to post-process this documentation directly on the command line. Most documentation tools I know needs to generate multiple HTML files anyway - and nickel could do the same -, which don't make much sense to print on stdout.

That being said, I think we currently don't even print a message to say "Written doc in ...". Would that help to add such an output? Also, what I said might not apply to outputting the doc as json, where it might be indeed common to pipe the output to something else. I'm not sure yet it would be a good idea to have a different default behavior depending on the format, though.

@gkleen
Copy link
Author

gkleen commented Oct 4, 2023

A message stating the path of the output file would certainly have alleviated my surprise.
I think it also wouldn't seem out of place in other automations like the generation of html docs like you describe :)

P.S.: Sorry for the late response – seem to have had some imap issues that went unnoticed; getting to the other issues now, too…

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

No branches or pull requests

2 participants