Skip to content

Add current CLI commands to packages/cli/README.md#310

Closed
AryanJ-NYC wants to merge 6 commits intoredwoodjs:masterfrom
AryanJ-NYC:issue#301
Closed

Add current CLI commands to packages/cli/README.md#310
AryanJ-NYC wants to merge 6 commits intoredwoodjs:masterfrom
AryanJ-NYC:issue#301

Conversation

@AryanJ-NYC
Copy link
Copy Markdown
Contributor

This pull request is a work in progress. I will mark it ready to review as soon as I can.

I opened this pull request to get comments on the documentation I have written so far. Great documentation requires some iteration so I thought I'd start that process as early as possible.

List of CLI Commands

  • redwood build
  • redwood db
    • redwood db down
    • redwood db generate
    • redwood db save
    • redwood db seed
    • redwood db up
  • redwood dev
  • redwood generate
    • redwood generate cell
    • redwood generate component
    • redwood generate layout
    • redwood generate page
    • redwood generate scaffold
    • redwood generate sdl
    • redwood generate service
  • redwood lint
  • redwood open
  • redwood test

I am yet to get around to those commands without the check.

Closes #301

@AryanJ-NYC
Copy link
Copy Markdown
Contributor Author

Question: we have CLI development instructions here and here. We probably want one source of truth. Should I consolidate? If so, to packages/CLI/README or /CONTRIBUTING.md? There are valid arguments for both.

@AryanJ-NYC
Copy link
Copy Markdown
Contributor Author

Question: The CLI README reads:

This is a monorepo and is published via LernaJS. See the root README for instructions.

The root README does not have these instructions. Are they available anywhere? Should I just delete this section?

Comment thread packages/cli/README.md Outdated
@peterp
Copy link
Copy Markdown
Member

peterp commented Mar 21, 2020

Thanks for this.

Your comment about the source of truth made me consider if adding documentation for each command (beyond what we already supply in the description) is valuable? @thedavidprice, maybe you can weight in here?

I can't imagine maintaining this in the README as well.

I think the CLI readme is useful for people who are trying to understand the purpose of this package.

@AryanJ-NYC
Copy link
Copy Markdown
Contributor Author

@peterp Great. In writing these docs, I kind of agree.

Perhaps the source of truth for how to use the Redwood CLI should be, well, the Redwood CLI. yarn redwood --help should be verbose enough to be documentation in and of itself (in my opinion).

With that thought, it may also help CLI users to implement some completion shortcuts for commands and options. This indirectly helps with documenting how the CLI is used and will probably be a big gain for developers.

With respect to this current PR, if we think the maintenance of this CLI README is a nightmare and is not very valuable, please don't be afraid to close it. There'll be no hurt feelings. I think a lot of good came out of it already.

@peterp
Copy link
Copy Markdown
Member

peterp commented Mar 21, 2020

@AryanJ-NYC Ok, and thanks! Like you said I don't think this is in vain since you're probably know a bunch about the CLI.

I think a completion shortcut would be amazing! Is there a way that completions can be generated from the commands that they import?

I opened up #311 in response to this.

@peterp peterp closed this Mar 21, 2020
@peterp
Copy link
Copy Markdown
Member

peterp commented Mar 21, 2020

I'm going to include the [port] fix, thanks for this!

@thedavidprice thedavidprice mentioned this pull request Mar 23, 2020
4 tasks
@thedavidprice
Copy link
Copy Markdown
Contributor

Starting up #322 to continue this conversation

@jtoar
Copy link
Copy Markdown
Contributor

jtoar commented May 12, 2020

@AryanJ-NYC are you interested in picking this up again? I'm about to take a crack at CLI docs and wanted to loop you in before I started.

@AryanJ-NYC AryanJ-NYC deleted the issue#301 branch May 12, 2020 17:56
@AryanJ-NYC
Copy link
Copy Markdown
Contributor Author

@jtoar Nope. Go for it!

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 current CLI commands to packages/cli/README.md

4 participants