@stravigor/create 0.4.7 → 0.4.8
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 +6 -2
- package/package.json +1 -1
- package/src/index.ts +8 -2
package/README.md
CHANGED
|
@@ -5,7 +5,9 @@ Scaffold a new [Strav](https://www.npmjs.com/package/@stravigor/core) applicatio
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
bunx @stravigor/create@latest my-app
|
|
8
|
+
bunx @stravigor/create@latest my-app --api # headless REST API
|
|
9
|
+
bunx @stravigor/create@latest my-app --web # full-stack with views
|
|
10
|
+
bunx @stravigor/create@latest my-app # interactive prompt
|
|
9
11
|
```
|
|
10
12
|
|
|
11
13
|
## Templates
|
|
@@ -18,7 +20,9 @@ bunx @stravigor/create@latest my-app
|
|
|
18
20
|
```
|
|
19
21
|
bunx @stravigor/create <project-name> [options]
|
|
20
22
|
|
|
21
|
-
--
|
|
23
|
+
--api Headless REST API template
|
|
24
|
+
--web Full-stack template with views and static files
|
|
25
|
+
--template, -t api|web Alias for --api / --web
|
|
22
26
|
--db <name> Database name (default: project name)
|
|
23
27
|
-h, --help Show help
|
|
24
28
|
```
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { select, input } from './prompts.ts'
|
|
|
5
5
|
import { scaffold } from './scaffold.ts'
|
|
6
6
|
import type { ScaffoldOptions } from './templates/shared.ts'
|
|
7
7
|
|
|
8
|
-
const VERSION = '0.4.
|
|
8
|
+
const VERSION = '0.4.8'
|
|
9
9
|
|
|
10
10
|
// ── Colors ──────────────────────────────────────────────────────────
|
|
11
11
|
|
|
@@ -33,6 +33,10 @@ function parseArgs(): ParsedArgs {
|
|
|
33
33
|
|
|
34
34
|
if (arg === '--help' || arg === '-h') {
|
|
35
35
|
result.help = true
|
|
36
|
+
} else if (arg === '--api') {
|
|
37
|
+
result.template = 'api'
|
|
38
|
+
} else if (arg === '--web') {
|
|
39
|
+
result.template = 'web'
|
|
36
40
|
} else if (arg === '--template' || arg === '-t') {
|
|
37
41
|
const val = args[++i]
|
|
38
42
|
if (val === 'api' || val === 'web') {
|
|
@@ -59,7 +63,9 @@ function printUsage(): void {
|
|
|
59
63
|
bunx @stravigor/create ${cyan('<project-name>')} [options]
|
|
60
64
|
|
|
61
65
|
${bold('Options:')}
|
|
62
|
-
--
|
|
66
|
+
--api Headless REST API template
|
|
67
|
+
--web Full-stack template with views and static files
|
|
68
|
+
--template, -t ${dim('api|web')} Alias for --api / --web
|
|
63
69
|
--db ${dim('<name>')} Database name (default: project name)
|
|
64
70
|
-h, --help Show this help message
|
|
65
71
|
`)
|