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: docs/cli/create-statikapi.mdx
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,31 +5,31 @@ Quickly scaffold a new StatikAPI project with templates and deployment presets.
5
5
<Tabsgroup="scaffold">
6
6
<Tablabel="pnpm">
7
7
8
-
```bash
9
-
npx create-statikapi my-api
10
-
```
8
+
```bash
9
+
pnpm dlx create-statikapi
10
+
```
11
11
12
12
</Tab>
13
13
<Tablabel="yarn">
14
14
15
-
```bash
16
-
npx create-statikapi my-api
17
-
```
15
+
```bash
16
+
yarn create statikapi
17
+
```
18
18
19
19
</Tab>
20
20
<Tablabel="npm">
21
21
22
-
```bash
23
-
npx create-statikapi my-api
24
-
```
22
+
```bash
23
+
npx create-statikapi
24
+
```
25
25
26
26
</Tab>
27
27
</Tabs>
28
28
29
29
You will be prompted for:
30
30
31
-
-**Template**: `basic`, `dynamic`, or `remote-data`
32
-
-**Package manager** and whether to install now
31
+
-**Template**: `basic`, `dynamic`, or `remote-data`
32
+
-**Package manager** and whether to install now
33
33
- Optional ESLint, TS, directories, and deploy presets
34
34
35
35
> **Note:** The **source** (`src-api/`) and **output** (`api-out/`) directories are defaults. You can **customize** these during scaffolding or later in your [Configuration](../config).
Copy file name to clipboardExpand all lines: docs/cli/statikapi.mdx
+33-53Lines changed: 33 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,105 +8,85 @@ The core CLI provides two commands: **`dev`** and **`build`**.
8
8
9
9
Watches your source and serves an interactive UI at `/_ui`.
10
10
11
-
> **Note:** The default **source dir** is `src-api/` and **output dir** is `api-out/`, both are configurable via your [Configuration](../config). You can also override them via CLI flags `--src` and `--out`.
11
+
> **Note:** The default **source dir** is `src-api/` and **output dir** is `api-out/`, both configurable via your [Configuration](../config). You can also override them via CLI flags `--src` and `--out`.
12
12
13
13
<Tabsgroup="dev">
14
14
<Tablabel="pnpm">
15
15
16
-
```bash
17
-
pnpm dev
18
-
```
16
+
```bash
17
+
pnpm dev
18
+
```
19
19
20
20
</Tab>
21
21
<Tablabel="yarn">
22
22
23
-
```bash
24
-
yarn dev
25
-
```
23
+
```bash
24
+
yarn dev
25
+
```
26
26
27
27
</Tab>
28
28
<Tablabel="npm">
29
29
30
-
```bash
31
-
npm run dev
32
-
```
30
+
```bash
31
+
npm run dev
32
+
```
33
33
34
34
</Tab>
35
35
</Tabs>
36
36
37
37
**Common flags**
38
38
39
-
-`--no-ui` — run server without the preview UI
40
-
-`--port <number>` — override dev port
41
-
-`--src <dir>` — override source dir (defaults to config or `src-api/`, configurable via [Configuration](../config))
42
-
-`--out <dir>` — override output dir (defaults to config or `api-out/`, configurable via [Configuration](../config))
39
+
-`--no-ui` — run server without the preview UI
40
+
-`--port <number>` — override dev port
41
+
-`--src <dir>` — override source dir (defaults to config or `src-api/`)
42
+
-`--out <dir>` — override output dir (defaults to config or `api-out/`)
43
43
44
44
---
45
45
46
46
## `statikapi build`
47
47
48
48
Builds static JSON into your output directory (default `api-out/`, configurable via [Configuration](../config)).
49
49
50
+
By default, all JSON files are **minified** — optimized for hosting and CI/CD pipelines.
51
+
If you prefer readable output, pass the `--pretty` flag.
52
+
50
53
<Tabsgroup="build">
51
54
<Tablabel="pnpm">
52
55
53
-
```bash
54
-
pnpm build
55
-
```
56
+
```bash
57
+
pnpm build
58
+
```
56
59
57
60
</Tab>
58
61
<Tablabel="yarn">
59
62
60
-
```bash
61
-
yarn build
62
-
```
63
+
```bash
64
+
yarn build
65
+
```
63
66
64
67
</Tab>
65
68
<Tablabel="npm">
66
69
67
-
```bash
68
-
npm run build
69
-
```
70
+
```bash
71
+
npm run build
72
+
```
70
73
71
74
</Tab>
72
75
</Tabs>
73
76
74
77
**Useful flags**
75
78
76
-
-`--pretty` — human‑readable `index.json`
77
-
-`--src <dir>` — override source dir (configurable; default `src-api/`)
78
-
-`--out <dir>` — override output dir (configurable; default `api-out/`)
79
+
-`--pretty` — output human-readable JSON
80
+
-`--src <dir>` — override source dir (default `src-api/`)
81
+
-`--out <dir>` — override output dir (default `api-out/`)
79
82
-`--clean` — remove old output before writing
80
83
81
-
**Script‑only variant** (skip prettifying, ideal for CI):
82
-
83
-
<Tabsgroup="build-only">
84
-
<Tablabel="pnpm">
85
-
86
-
```bash
87
-
pnpm run build:api
88
-
```
89
-
90
-
</Tab>
91
-
<Tablabel="yarn">
92
-
93
-
```bash
94
-
yarn build:api
95
-
```
96
-
97
-
</Tab>
98
-
<Tablabel="npm">
99
-
100
-
```bash
101
-
npm run build:api
102
-
```
103
-
104
-
</Tab>
105
-
</Tabs>
84
+
> 💡 **Ideal for CI/CD:**
85
+
> Use `statikapi build` (without `--pretty`) for faster builds and smaller artifacts.
106
86
107
87
---
108
88
109
89
## Exit codes
110
90
111
-
-`0`success
112
-
- non‑zero indicates an error (parsing, user module errors, etc.)
91
+
-`0`— success
92
+
- non-zero — indicates an error (parsing, user module errors, etc.))
2.**Fork and branch** off `main`. Use a descriptive branch name like `feat/route-aliases`.
47
47
3.**Develop locally** (see quickstart below). Keep commits small and focused.
48
48
4.**Tests and lint** must pass before opening a PR:
@@ -52,7 +52,7 @@ We welcome bug reports, fixes, features, docs improvements, and examples.
52
52
```
53
53
5.**Open a PR** using the pull request template. Explain the change and link issues.
54
54
55
-
Read the full guide: [`CONTRIBUTING.md`](../CONTRIBUTING.md) and the PR template: [`.github/PULL_REQUEST_TEMPLATE.md`](../.github/PULL_REQUEST_TEMPLATE.md).
55
+
Read the full guide: [`CONTRIBUTING.md`](https://github.com/zonayedpca/statikapi/tree/master/CONTRIBUTING.md) and the PR template: [`.github/PULL_REQUEST_TEMPLATE.md`](https://github.com/zonayedpca/statikapi/tree/master/.github/PULL_REQUEST_TEMPLATE.md).
0 commit comments