-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(docs): add --dryRun
option
#454
Conversation
We're going to consistently return strings here instead of the total raw dump of the doc objects. it's not very intuitive nor readable, and by being able to consistently return strings that we can format, it'll set up the dry run functionality quite nicely.
--dryRun
option
@@ -160,6 +181,6 @@ module.exports = class DocsCommand { | |||
}) | |||
); | |||
|
|||
return updatedDocs; | |||
return chalk.green(updatedDocs.join('\n')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command output has changed which is why I'm including this in the v7
milestone, but I can be convinced otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im good to keep this only in v7
Added some docs here: e6b946a |
🧰 Changes
Realized while working on the docs syncing workflow in #439 that this would be a super easy win and extremely useful to have.
--dryRun
option todocs
command--dryRun
testsdocs
command successfully, the output an enormous, mostly unreadable JS array of objects (example). Since this tool now supports debugging, this isn't really necessary and isn't particularly user-friendly. So this PR reformats thedocs
command outputs so it always returns formatted success messages doc objects🧬 QA & Testing
If tests pass, we should be good to go! You can also try this out yourself on any project by checking out this branch and running the following command:
This won't make any changes in your project and instead will return a command output that looks like this: