-
Notifications
You must be signed in to change notification settings - Fork 467
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
Feature/separate files #492
Open
willchang
wants to merge
5
commits into
pseudomuto:master
Choose a base branch
from
willchang:feature/separate_files
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…o input files instead of grouping input files into one output file.
…les based on new flag.
…outputted when running plugin.
…umber (now 4). Also changed for loop to be more idiomatic.
willchang
force-pushed
the
feature/separate_files
branch
from
August 19, 2022 16:54
d0ef57b
to
38c90d2
Compare
leandro-at-flipp
approved these changes
Aug 22, 2022
Is this feature available on latest Thank you for your work on this library. |
Thanks @adlion, it needs to be approved first by someone with write access. cc: @pseudomuto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello! I've come across a use case where it would be nice to have one output file per input file. I'm setting up a static documentation site for Proto files and the UX is better when the output mirrors the input instead of having them grouped together on one page (regardless of using
source_relative
or not).Summary
This PR adds support for a
separate_files
flag which outputs one file per input file instead of grouping input files into one output file.Usage:
This would output:
Notes on Behaviour
md
like in the example above, the output files would be<filename>.md
.source_relative
or without, it does not changesource_relative
's functionality.Testing it Out
I was testing using this command from the repo root:
Additional Notes on Implementation
I've kept the same convention of adding another parameter to the
--doc_opt
list. I can foresee this becoming hard to manage in the future since a) parameters are mapped to indices which makes the code ugly as you gain more parameters and b) usage-wise you must specifydefault
for previous parameters you may not care about. However, I didn't want to make assumptions on the grander vision of this API (and also introduce a lot of out-of-scope changes) so I just followed the convention.I'm an iOS developer and Go is a little foreign to me, so please feel free to give feedback on conventions or anything else that doesn't seem to fit quite right. Thanks!