Skip to content

Commit

Permalink
(docs): Minor Command update about Storybook (#6722)
Browse files Browse the repository at this point in the history
* Update text about how storybook opens by default and how that can be avoided

* fix: implement suggestion and format

Co-authored-by: Dominic Saadi <dominiceliassaadi@gmail.com>
  • Loading branch information
jacebenson and jtoar authored Nov 4, 2022
1 parent 25f69aa commit 6aab59c
Showing 1 changed file with 45 additions and 45 deletions.
90 changes: 45 additions & 45 deletions docs/docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ yarn redwood dev [side..]
`yarn redwood dev api` starts the Redwood dev server and `yarn redwood dev web` starts the Webpack dev server with Redwood's config.
| Argument | Description |
| :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `side` | Which dev server(s) to start. Choices are `api` and `web`. Defaults to `api` and `web` |
| Argument | Description |
| :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `side` | Which dev server(s) to start. Choices are `api` and `web`. Defaults to `api` and `web` |
| `--forward, --fwd` | String of one or more Webpack Dev Server config options. See example usage below. See the [Redwood Webpack Doc](webpack-configuration.md#webpack-dev-server) for more details and examples. |
**Usage**
Expand Down Expand Up @@ -247,7 +247,7 @@ yarn redwood deploy <target>
```
| Commands | Description |
|:------------------------------|:-----------------------------------------|
| :---------------------------- | :--------------------------------------- |
| `serverless ` | Deploy to AWS using Serverless framework |
| `netlify [...commands]` | Build command for Netlify deploy |
| `render <side> [...commands]` | Build command for Render deploy |
Expand All @@ -262,7 +262,7 @@ yarn redwood deploy serverless
```
| Options & Arguments | Description |
|:--------------------|:--------------------------------------------------------------------------------------------------------------------------------------------|
| :------------------ | :------------------------------------------------------------------------------------------------------------------------------------------ |
| `--side` | which Side(s)to deploy [choices: "api", "web"] [default: "web","api"] |
| `--stage` | serverless stage, see [serverless stage docs](https://www.serverless.com/blog/stages-and-environments) [default: "production"] |
| `--pack-only` | Only package the build for deployment |
Expand Down Expand Up @@ -368,7 +368,7 @@ yarn redwood destroy <type>
| `sdl <model>` | Destroy a GraphQL schema and service component based on a given DB schema Model |
| `service <name>` | Destroy a service component |
| `directive <name>` | Destroy a directive |
| `graphiql` | Destroy a generated graphiql file |
| `graphiql` | Destroy a generated graphiql file |
## exec
Expand Down Expand Up @@ -584,9 +584,9 @@ Generate log in, sign up, forgot password and password reset pages for dbAuth
yarn redwood generate dbAuth
```
| Arguments & Options | Description |
| -------------------- | ------------------------------------------------------------------------------------------------ |
| `--webAuthn` | Whether or not to add webAuthn support to the log in page. If not specified you will be prompted |
| Arguments & Options | Description |
| ------------------- | ------------------------------------------------------------------------------------------------ |
| `--webAuthn` | Whether or not to add webAuthn support to the log in page. If not specified you will be prompted |
If you don't want to create your own log in, sign up, forgot password and
password reset pages from scratch you can use this generator. The pages will be
Expand Down Expand Up @@ -1719,13 +1719,13 @@ A `generateGraphiQLHeader` file will be created in your `api/lib` folder and inc
yarn redwood setup graphiql <provider>
```
| Arguments & Options | Description |
| :------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | Auth provider to configure. Choices are `dbAuth`, `netlify`, and `supabase` |
| `--id, -i` | Unique id to identify current user (required only for DBAuth) |
| `--token, -t` | Generated JWT token. If not provided, a mock JWT payload is returned in `api/lib/generateGraphiQLHeader` that can be modified and turned into a token |
| `--expiry, -e` | Token expiry in minutes. Default is 60 |
| `--view, -v` | Print out generated headers to console |
| Arguments & Options | Description |
| :------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `provider` | Auth provider to configure. Choices are `dbAuth`, `netlify`, and `supabase` |
| `--id, -i` | Unique id to identify current user (required only for DBAuth) |
| `--token, -t` | Generated JWT token. If not provided, a mock JWT payload is returned in `api/lib/generateGraphiQLHeader` that can be modified and turned into a token |
| `--expiry, -e` | Token expiry in minutes. Default is 60 |
| `--view, -v` | Print out generated headers to console |
### setup custom-web-index
Expand Down Expand Up @@ -1770,18 +1770,18 @@ Your template will receive the provided `name` in a number of different variatio
For example, given the name `fooBar` your template will receive the following _variables_ with the given _values_
| Variable | Value |
| :------------------------ | :------------ |
| `pascalName` | `FooBar` |
| `camelName` | `fooBar` |
| `singularPascalName` | `FooBar` |
| `pluralPascalName` | `FooBars` |
| `singularCamelName` | `fooBar` |
| `pluralCamelName` | `fooBars` |
| `singularParamName` | `foo-bar` |
| `pluralParamName` | `foo-bars` |
| `singularConstantName` | `FOO_BAR` |
| `pluralConstantName` | `FOO_BARS` |
| Variable | Value |
| :--------------------- | :--------- |
| `pascalName` | `FooBar` |
| `camelName` | `fooBar` |
| `singularPascalName` | `FooBar` |
| `pluralPascalName` | `FooBars` |
| `singularCamelName` | `fooBar` |
| `pluralCamelName` | `fooBars` |
| `singularParamName` | `foo-bar` |
| `pluralParamName` | `foo-bars` |
| `singularConstantName` | `FOO_BAR` |
| `pluralConstantName` | `FOO_BARS` |
**Example**
Expand Down Expand Up @@ -1866,10 +1866,10 @@ Set up a UI design or style library. Right now the choices are [TailwindCSS](htt
yarn rw setup ui <library>
```
| Arguments & Options | Description |
| :------------------ | :-------------------------------------------------------------------------- |
| Arguments & Options | Description |
| :------------------ | :-------------------------------------------------------------------------------------- |
| `library` | Library to configure. Choices are `chakra-ui`, `tailwindcss`, `mantine`, and `windicss` |
| `--force, -f` | Overwrite existing configuration |
| `--force, -f` | Overwrite existing configuration |
## storybook
Expand All @@ -1885,11 +1885,11 @@ yarn redwood storybook
RedwoodJS supports Storybook by creating stories when generating cells, components, layouts and pages. You can then use these to describe how to render that UI component with representative data.
| Arguments & Options | Description |
| :------------------ | :------------------------------------------------ |
| `--open` | Open Storybook in your browser on start |
| `--build` | Build Storybook |
| `--port` | Which port to run Storybook on (defaults to 7910) |
| Arguments & Options | Description |
| :------------------ | :------------------------------------------------------------------------------------------------- |
| `--open` | Open Storybook in your browser on start [default: true]. Pass `--no-open` to disable this behavior |
| `--build` | Build Storybook |
| `--port` | Which port to run Storybook on [default: 7910] |
## test
Expand All @@ -1899,15 +1899,15 @@ Run Jest tests for api and web.
yarn redwood test [side..]
```
| Arguments & Options | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sides or filter` | Which side(s) to test, and/or a regular expression to match against your test files to filter by |
| `--help` | Show help |
| `--version` | Show version number |
| `--watch` | Run tests related to changed files based on hg/git (uncommitted files). Specify the name or path to a file to focus on a specific set of tests [default: true] |
| `--watchAll` | Run all tests |
| `--collectCoverage` | Show test coverage summary and output info to `coverage` directory in project root. See this directory for an .html coverage report |
| `--clearCache` | Delete the Jest cache directory and exit without running tests |
| Arguments & Options | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sides or filter` | Which side(s) to test, and/or a regular expression to match against your test files to filter by |
| `--help` | Show help |
| `--version` | Show version number |
| `--watch` | Run tests related to changed files based on hg/git (uncommitted files). Specify the name or path to a file to focus on a specific set of tests [default: true] |
| `--watchAll` | Run all tests |
| `--collectCoverage` | Show test coverage summary and output info to `coverage` directory in project root. See this directory for an .html coverage report |
| `--clearCache` | Delete the Jest cache directory and exit without running tests |
| `--db-push` | Syncs the test database with your Prisma schema without requiring a migration. It creates a test database if it doesn't already exist [default: true]. This flag is ignored if your project doesn't have an `api` side. [👉 More details](#prisma-db-push). |
> **Note** all other flags are passed onto the jest cli. So for example if you wanted to update your snapshots you can pass the `-u` flag
Expand Down

0 comments on commit 6aab59c

Please sign in to comment.