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/commands/create-app.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,47 @@ npx @dhis2/create-app --yes
23
23
# or npm create @dhis2/app -- --yes
24
24
```
25
25
26
-
By passing `--yes` argument, this will create a new DHIS2 web application using the default options without prompting (using `pnpm` as a package manager, and `TypeScript` as the language).
26
+
By passing `--yes` argument, this will create a new DHIS2 web application using the default options without prompting (using `pnpm` as a package manager, and `TypeScript` as the language, and the default `basic` template).
27
27
28
28
If you omit the `--yes` argument (`pnpm create @dhis2/app project-name`), then you will be prompted and guided through a wizard to choose your options.
29
29
30
30
You can run the commands in `debug` mode to get more verbose logs by passing the `--debug` option (`pnpm create @dhis2/app project-name --debug`).
31
+
32
+
# CLI options
33
+
34
+
Instead of going through the wizard, you can pass arguments to specify the options to use when creating a new app.
35
+
36
+
You can run `pnpm create @dhis2/app@alpha --help` for the list of options available:
37
+
38
+
```sh
39
+
--yes, -y Skips interactive setup questions,
40
+
using default options to create the
41
+
new app (TypeScript, pnpm, basic
42
+
template) [boolean] [default: false]
43
+
--typescript, --ts, --typeScript Use TypeScript or JS [boolean]
44
+
--template Which template to use (Basic, With
45
+
React Router) [string]
46
+
--packageManager, --package, Package Manager
47
+
--packagemanager [string]
48
+
```
49
+
50
+
## Examples
51
+
52
+
Here are some examples of how you can use the CLI
53
+
54
+
```sh
55
+
# create a new app using the default settings (pnpm, TypeScript, basic template)
56
+
pnpm create @dhis2/app my-app --yes
57
+
58
+
# use the default settings but override the template
0 commit comments