@nexus_js/create-nexus 0.7.1 → 0.7.4
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 +43 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Official project scaffold for [Nexus](https://nexusjs.dev). Published under the **`@nexus_js`** scope so you can publish without fighting for the global name `create-nexus` on npm.
|
|
4
4
|
|
|
5
|
-
**Until this package is on the registry**, `pnpm create @nexus_js/nexus` will **404**. Use **`npm exec --package=@nexus_js/cli@latest -- create-nexus my-app`** (or `pnpm dlx --package=@nexus_js/cli@latest create-nexus my-app`) — the scaffold lives in `@nexus_js/cli` either way.
|
|
6
|
-
|
|
7
|
-
## Usage (after `@nexus_js/create-nexus` is published)
|
|
8
|
-
|
|
9
5
|
npm maps **`npm create @scope/name`** to the package **`@scope/create-name`**:
|
|
10
6
|
|
|
11
7
|
```bash
|
|
@@ -20,12 +16,53 @@ pnpm create @nexus_js/nexus
|
|
|
20
16
|
yarn create @nexus_js/nexus
|
|
21
17
|
```
|
|
22
18
|
|
|
19
|
+
```bash
|
|
20
|
+
bunx @nexus_js/create-nexus@latest
|
|
21
|
+
```
|
|
22
|
+
|
|
23
23
|
With a folder name:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
npm create @nexus_js/nexus@latest my-app
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
### Interactive setup (default in a terminal)
|
|
30
|
+
|
|
31
|
+
Running create without `--yes` starts a short wizard (similar to Next.js / Nuxt):
|
|
32
|
+
|
|
33
|
+
1. **Project directory** — folder name under the current path (default `my-nexus-app`, or the name you passed as the first argument).
|
|
34
|
+
2. **Starter** — **minimal** or **full** (unless you already passed `-t` / `--template`).
|
|
35
|
+
3. **Summary** — confirm with **Y** before files are written.
|
|
36
|
+
|
|
37
|
+
If the target folder already exists, the CLI exits with an error (no overwrite).
|
|
38
|
+
|
|
39
|
+
### Non-interactive / CI
|
|
40
|
+
|
|
41
|
+
Use **`--yes`** (or **`-y`**, **`--defaults`**) to skip all prompts:
|
|
42
|
+
|
|
43
|
+
- Directory: first positional argument, or `my-nexus-app`.
|
|
44
|
+
- Starter: **`--template`**, or **full** by default.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm create @nexus_js/nexus@latest -- --yes
|
|
48
|
+
npx @nexus_js/create-nexus@latest ci-app --yes --template minimal
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Starter templates
|
|
52
|
+
|
|
53
|
+
| Template | Flag | What you get |
|
|
54
|
+
|----------|------|----------------|
|
|
55
|
+
| **Minimal** | `--template minimal` or `-t minimal` | One landing `+page.nx`, simple `+layout.nx`, no i18n, no example blog or `/islands` route — closest to a blank slate. |
|
|
56
|
+
| **Full** | `--template full` or `-t full` (default when non-interactive) | i18n (en/es/pt), islands presentation page, blog examples. |
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm create @nexus_js/nexus@latest my-app -- --template minimal
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx @nexus_js/create-nexus@latest my-app -t full
|
|
64
|
+
```
|
|
65
|
+
|
|
29
66
|
Direct binary (same as above):
|
|
30
67
|
|
|
31
68
|
```bash
|
|
@@ -36,8 +73,8 @@ Then:
|
|
|
36
73
|
|
|
37
74
|
```bash
|
|
38
75
|
cd my-app
|
|
39
|
-
npm install
|
|
40
|
-
npm run dev
|
|
76
|
+
npm install # or: pnpm install / yarn / bun install
|
|
77
|
+
npm run dev # or: pnpm dev / yarn dev / bun run dev
|
|
41
78
|
```
|
|
42
79
|
|
|
43
80
|
The implementation lives in **`@nexus_js/cli`**; this package only wires the **create** entrypoint.
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexus_js/create-nexus",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Create a new Nexus app — npm create @nexus_js/nexus (scoped; avoids unscoped name conflicts on npm)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"create-nexus": "./bin/create-nexus.mjs"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@nexus_js/cli": "^0.7.
|
|
10
|
+
"@nexus_js/cli": "^0.7.4"
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"homepage": "https://nexusjs.dev",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"registry": "https://registry.npmjs.org/"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
39
|
+
"node": ">=22.0.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "node -e \"process.exit(0)\"",
|