@datadog/create-apps 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,10 +12,12 @@ yarn init @datadog/apps
12
12
 
13
13
  Follow the interactive prompts to:
14
14
 
15
- 1. Enter your app name
16
- 2. Select a template
15
+ 1. Enter your app name (human-readable, e.g. "My Awesome App")
16
+ 2. Enter a directory name (slugified default from the app name, e.g. "my-awesome-app")
17
+ 3. Enter your Datadog site (defaults to `datadoghq.com`; use your custom subdomain if you have one)
18
+ 4. Select a template
17
19
 
18
- Your new Datadog App will be created in a directory named after your app.
20
+ Your new Datadog App will be created in the specified directory.
19
21
 
20
22
  ## Templates
21
23
 
@@ -27,23 +29,32 @@ You can pass a target directory as the first positional argument, plus any of th
27
29
 
28
30
  ```bash
29
31
  npm init @datadog/apps my-app --template vite-react -y
32
+ npm init @datadog/apps my-app --name "My App" --site datadoghq.eu -y
30
33
  ```
31
34
 
32
35
  ### `<directory>`
33
36
 
34
37
  Target directory for the new app. If omitted, you'll be prompted.
35
38
 
39
+ ### `--name <name>`
40
+
41
+ App name (user-facing). Skips the app name prompt.
42
+
43
+ ### `--site <site>`
44
+
45
+ Datadog site (e.g. `datadoghq.com`, `datadoghq.eu`, `acme.datadoghq.com`). Skips the site prompt. Validated against known Datadog sites.
46
+
36
47
  ### `--template <name>`
37
48
 
38
49
  Skip the template prompt and use the named template (e.g. `vite-react`).
39
50
 
40
51
  ### `--yes`, `-y`
41
52
 
42
- Accept all defaults without prompting.
53
+ Accept all defaults without prompting. Requires a directory to be provided as a positional argument.
43
54
 
44
55
  ### `--overwrite`
45
56
 
46
- Overwrite an existing target directory without prompting.
57
+ Overwrite an existing target directory without prompting. Required to replace an existing directory in non-interactive (`--yes`) mode.
47
58
 
48
59
  ### `--skip-post-scaffold`
49
60
 
@@ -58,7 +69,10 @@ Validate the bundled templates and exit. Intended for CI / development of this C
58
69
  The CLI will:
59
70
 
60
71
  - Create a new directory for your app
61
- - Generate all necessary files from the selected template
72
+ - Generate all necessary files from the selected template, including:
73
+ - `datadog-app.config.json` — app definition and configuration (`datadogSite`, `id`, `name`)
74
+ - `vite.config.ts` — imports `datadog-app.config.json` and maps the flat fields into the `datadogVitePlugin(...)` call, layering env-dependent values on top
75
+ - `package.json` (using the slugified directory name), source files, docs, and agent instructions
62
76
  - Integrate Datadog features like ErrorTracking, Metrics, and more... thanks to our [build-plugins](https://github.com/DataDog/build-plugins).
63
77
  - Optionally run setup commands (install dependencies, initialize git)
64
78