You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68-1Lines changed: 68 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,27 @@ Generate type-safe TypeScript clients directly from your Elixir Ash resources, e
18
18
19
19
**Get up and running in under 5 minutes:**
20
20
21
-
### 1. Installation
21
+
### 1. Installation & Setup
22
+
23
+
**Option A: Automatic Setup with Igniter (Recommended)**
24
+
25
+
Add AshTypescript to your project and run the automated installer:
26
+
27
+
```bash
28
+
# Add ash_typescript to your mix.exs and install
29
+
mix igniter.install ash_typescript
30
+
31
+
# For a full-stack Phoenix + React setup, use the --react flag:
32
+
mix igniter.install ash_typescript --react
33
+
```
34
+
35
+
The installer automatically:
36
+
- ✅ Adds AshTypescript to your dependencies
37
+
- ✅ Configures AshTypescript settings in `config.exs`
38
+
- ✅ Creates RPC controller and routes
39
+
- ✅ With `--react`: Sets up React + TypeScript environment, and a getting started guide
40
+
41
+
**Option B: Manual Installation**
22
42
23
43
Add to your `mix.exs`:
24
44
@@ -32,6 +52,8 @@ end
32
52
33
53
### 2. Configure your domain
34
54
55
+
**Note:** If you used the automatic installer (`mix igniter.install ash_typescript`), you can skip to step 5. The following steps are only needed for manual installation.
56
+
35
57
```elixir
36
58
defmoduleMyApp.Domaindo
37
59
useAsh.Domain, extensions: [AshTypescript.Rpc]
@@ -87,6 +109,8 @@ end
87
109
88
110
### 5. Generate TypeScript types
89
111
112
+
**After using the installer or completing manual setup:**
113
+
90
114
**Recommended approach** (runs codegen for all Ash extensions in your project):
0 commit comments