Skip to content

Commit

Permalink
Add usage docs and move polygen app
Browse files Browse the repository at this point in the history
  • Loading branch information
v1def committed Jan 10, 2023
1 parent 61db493 commit 81da168
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .polygen.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# List of collections for which you want to generate code.
collection:
- "Collection"
- "Namespace/Collection"

language:
go:
package: "package_name"
directory: "directory/to/save"
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,32 @@
## Install PolyGen

```bash
go install github.com/durudex/polygen/cmd@latest
go install github.com/durudex/polygen/cmd/polygen@latest
```

## Usage

1) To start working with PolyGen, you need to create a configuration according
to which the code will be generated.

```yml
collection:
- "Collection"

language:
go:
package: "generated"
directory: "generated"
```
> You can find the complete configuration in the
> [.polygen.example.yml](.polygen.example.yml) file.
2) Now you need to run PolyGen with the `--config` or `-c` flag and specify the
path to your configuration file.

```bash
polygen --config .polygen.yml
```

## ⚠️ License
Expand Down
File renamed without changes.

0 comments on commit 81da168

Please sign in to comment.