Skip to content

Commit

Permalink
Moves 'Exclude files and folders' Readme subsection to 'Keep contexts…
Browse files Browse the repository at this point in the history
… separate' section
  • Loading branch information
szsoppa committed Oct 25, 2023
1 parent 36561a2 commit 54a7028
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ _Note: Official documentation for contexted library is [available on hexdocs][he
- [Installation](#installation)
- [Step by step overview](#step-by-step-overview)
- [Keep contexts separate](#keep-contexts-separate)
- [Exclude files and folders from check context cross-references](#exclude-files-and-folders-from-check-context-cross-references)
- [Dividing each context into smaller parts](#dividing-each-context-into-smaller-parts)
- [Being able to access docs and specs in auto-delegated functions](#being-able-to-access-docs-and-specs-in-auto-delegated-functions)
- [Exclude files and folders from check context cross-references](#exclude-files-and-folders-from-check-context-cross-references)
- [Don't repeat yourself with CRUD operations](#dont-repeat-yourself-with-crud-operations)
- [Contributing](#contributing)
- [License](#license)
Expand Down Expand Up @@ -104,7 +104,7 @@ def project do
end
```

Next, define a list of contexts available in the app inside _config.exs_:
Next, define a list of contexts available in the app inside config file:

```elixir
config :contexted, contexts: [
Expand All @@ -124,6 +124,17 @@ Read more about `Contexted.Tracer` and its options in [docs](https://hexdocs.pm/

<br/>

#### Exclude files and folders from check context cross-references

In special cases, you may need to exclude certain folders or files from cross-reference checks due to project structure or naming conventions. To do this, add a list of exclusions in config `exclude_paths` option:

```elixir
config :contexted,
exclude_paths: ["app/test"]
```

<br/>

### Dividing each context into smaller parts

To divide big Context into smaller Subcontexts, we can use `delegate_all/1` macro from `Contexted.Delegator` module.
Expand Down Expand Up @@ -199,17 +210,6 @@ Read more about `Contexted.Delegator` and its options in [docs](https://hexdocs.

<br/>

#### Exclude files and folders from check context cross-references

Inside your `config.exs` you can add list of files and folders to exclude from checking context cross-references:

```elixir
config :contexted,
exclude_paths: ["app/test", "app/lib/app/account.ex"]
```

<br/>

### Don't repeat yourself with CRUD operations

In most web apps CRUD operations are very common. Most of these, have the same pattern. Why not autogenerate them?
Expand Down

0 comments on commit 54a7028

Please sign in to comment.