Skip to content

Commit 1ec2d30

Browse files
committed
refactor: update default output directory
1 parent c76d9d6 commit 1ec2d30

File tree

110 files changed

+2680
-2036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+2680
-2036
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
"tangrams": minor
3+
---
4+
5+
**BREAKING:** Changed default output directory from `./src/generated` to `./tangrams`.
6+
7+
Users upgrading should either:
8+
- Update their imports to use the new default location
9+
- Explicitly set `output: "./src/generated"` in their config to maintain the previous behavior
10+
11+
We recommend using a `@tangrams/*` path alias in your `tsconfig.json` for cleaner imports:
12+
13+
```json
14+
{
15+
"compilerOptions": {
16+
"paths": {
17+
"@tangrams/*": ["./tangrams/*"]
18+
}
19+
},
20+
"include": ["src", "tangrams"]
21+
}
22+
```

apps/docs/content/docs/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ Here's a comprehensive example showing all available configuration options:
9292
import { defineConfig } from "tangrams"
9393

9494
export default defineConfig({
95-
// Output directory for all generated files (default: "./src/generated")
96-
output: "./src/generated",
95+
// Output directory for all generated files (default: "./tangrams")
96+
output: "./tangrams",
9797

9898
// Validation library for generated schemas (default: "zod")
9999
// Supported: "zod", "valibot", "arktype"
@@ -229,7 +229,7 @@ export default defineConfig({
229229

230230
| Option | Type | Default | Description |
231231
|--------|------|---------|-------------|
232-
| `output` | `string` | `"./src/generated"` | Output directory for all generated files |
232+
| `output` | `string` | `"./tangrams"` | Output directory for all generated files |
233233
| `validator` | `"zod" \| "valibot" \| "arktype"` | `"zod"` | Validation library for generated schemas |
234234
| `sources` | `SourceConfig[]` | (required) | Array of data sources (minimum 1 required) |
235235

@@ -450,7 +450,7 @@ overrides: {
450450
Generated files are organized by source name:
451451

452452
```
453-
src/generated/
453+
tangrams/
454454
└── <source-name>/
455455
├── client.ts # API client (GraphQL or REST)
456456
├── schema.ts # Validation schemas + TypeScript types

apps/docs/content/docs/tanstack-db.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ bunx tangrams generate
183183
### Output Directory Structure
184184

185185
```
186-
src/generated/
186+
tangrams/
187187
└── <source>/
188188
├── client.ts # API client (shared)
189189
├── schema.ts # Validation schemas + TypeScript types

apps/docs/content/docs/tanstack-form.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ bunx tangrams generate
133133
### Output Directory Structure
134134

135135
```
136-
src/generated/
136+
tangrams/
137137
└── <source>/
138138
├── schema.ts # Validation schemas for request bodies
139139
└── form/

apps/docs/content/docs/tanstack-query.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ bunx tangrams generate
210210
### Output Directory Structure
211211

212212
```
213-
src/generated/
213+
tangrams/
214214
└── <source>/
215215
├── client.ts # API client (shared)
216216
├── schema.ts # Validation schemas + TypeScript types

examples/start-full-stack/src/generated/api/db/collections.ts

Lines changed: 0 additions & 113 deletions
This file was deleted.

examples/start-full-stack/src/generated/api/functions.ts

Lines changed: 0 additions & 114 deletions
This file was deleted.

examples/start-full-stack/src/generated/api/query/operations.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

examples/start-full-stack/src/lib/collections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
petCollectionOptions,
33
userCollectionOptions,
4-
} from "@/generated/api/db/collections";
4+
} from "@tangrams/api/db/collections";
55

66
import type { QueryClient } from "@tanstack/react-query";
77

0 commit comments

Comments
 (0)