Skip to content

Commit

Permalink
chore: more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aredda committed May 2, 2024
1 parent b43515a commit 37c5143
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,39 @@ If bundler is not being used to manage dependencies, install the gem by executin

## Usage

All concept files are generated inside the `app/concepts` directory.

To generate files, simply run this command:

$ wizard [--model] [--actions] [--only] [--except] [--context]

| Argument | Type | Presence | Description |
|----------|--------|--------------|-------------------------------------------------------|
| model | String | **Required** | The model. |
| actions | Array | **Required** | The files' names. |
| only | Array | Optional | Only the specified *concept types*. |
| except | Array | Optional | Except the specified *concept types*. |
| context | String | Optional | A directory to group concept files, `nil` by default. |

Allowed concept types are: `operation | finder | form (meant for contracts) | view (meant for representables)`

#### Example 1:

wizard --model=User --actions=create --only=operation,form

This command will generate:

app/concepts/user/operation/create.rb
app/concepts/user/form/create.rb

#### Example 2: with context

wizard --model=User --context=admin --actions=index --only=operation

Generates:

app/concepts/user/admin/operation/index.rb

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/aredda/trailblazer-wizard. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/wizard/blob/main/CODE_OF_CONDUCT.md).
Expand Down

0 comments on commit 37c5143

Please sign in to comment.