Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Options Docs #17

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ on:
push:
branches:
- main
paths:
- '**.rs'
- Cargo.{lock,toml}

pull_request:
branches:
- main
paths:
- '**.rs'
- Cargo.{lock,toml}

jobs:
build:
Expand Down
33 changes: 14 additions & 19 deletions docs/config/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ Zap has a number of options marked with `opt`, that must be placed at the start

## Example Options

<CodeBlock :code="['opt casing = PascalCase', 'opt writechecks = false', 'opt typescript = false'].join('\n')" />
<CodeBlock :code="['opt output_client = ./src/client/remotes.luau', 'opt output_server = ./src/server/remotes.luau', 'opt casing = PascalCase', 'opt write_checks = false'].join('\n')" />

## Output

The output options allow you to define where zap will output its generated code.

### Default

<CodeBlock :code="['opt output_client = ./network/client.luau', 'opt output_server = ./network/server.luau'].join('\n')" />

### Example

<CodeBlock :code="['opt output_client = ./src/client/remotes.luau', 'opt output_server = ./src/server/remotes.luau'].join('\n')" />

## Casing

Expand Down Expand Up @@ -39,21 +51,4 @@ The writechecks option determines if conditional constraints should be valided o

### Example

<CodeBlock code="opt writechecks = false" />

## TypeScript

The TypeScript option determines if `.d.ts` files should be outputted for support with [roblox-ts](https://roblox-ts.com/).

### Default

`false`

### Options

- `true`
- `false`

### Example

<CodeBlock code="opt typescript = false" />
<CodeBlock code="opt write_checks = false" />