create-nevela 0.1.1 → 0.1.2

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
@@ -1,55 +1,64 @@
1
- # create-nevela
2
-
3
- Create a new [Nevela](https://nevela-docs.vercel.app) app: a Laravel API and a Next.js dashboard, generated from one resource description.
4
-
5
- ```sh
6
- pnpm create nevela my-app
7
- # or
8
- npm create nevela@latest my-app
9
- ```
10
-
11
- You need PHP 8.3 or newer, Composer, and Node.js 20 or newer.
12
-
13
- ## What you get
14
-
15
- ```
16
- my-app/
17
- ├─ apps/api/ a Laravel app with Sanctum and Nevela installed
18
- ├─ apps/web/ the Next.js dashboard, pointed at the API
19
- └─ scripts/ `dev` runs both together
20
- ```
21
-
22
- Then:
23
-
24
- ```sh
25
- cd my-app
26
- pnpm run dev
27
- ```
28
-
29
- Open http://localhost:3000/sign-in and sign in as `admin@example.com` with the password `password`. That starter account is in your local database only; add your own with `php artisan nevela:user`.
30
-
31
- Add your first resource from `apps/api`:
32
-
33
- ```sh
34
- php artisan nevela:resource Product --fields="name:string, sku:string!, price:money"
35
- php artisan migrate
36
- ```
37
-
38
- ## Options
39
-
40
- | Option | Meaning |
41
- |---|---|
42
- | `--pm <pnpm\|npm\|yarn\|bun>` | Package manager for the dashboard. Default: the one you ran this with. |
43
- | `--no-install` | Don't install the dashboard's dependencies. |
44
- | `--no-user` | Don't create the starter account. |
45
- | `--no-git` | Don't run `git init`. |
46
- | `--bundled-package` | Use the copy of `nevela/laravel` inside this installer instead of the release on Packagist. |
47
- | `-y`, `--yes` | Ask nothing. Only the app name is ever asked for. |
48
-
49
- With npm, put options after `--`: `npm create nevela@latest my-app -- --no-install`.
50
-
51
- ## How it installs the Laravel package
52
-
53
- `nevela/laravel` is installed from [Packagist](https://packagist.org/packages/nevela/laravel), at the release that matches this installer's version.
54
-
55
- If Packagist has no matching release, or you pass `--bundled-package`, the copy that travels inside this installer is placed in `my-app/packages/nevela-laravel` and Composer installs it from there. That is how Nevela's own CI tests a change to the package before it is released.
1
+ # create-nevela
2
+
3
+ Create a new [Nevela](https://nevela-docs.vercel.app) app: a Laravel API and a Next.js dashboard, generated from one resource description.
4
+
5
+ ```sh
6
+ pnpm create nevela my-app
7
+ # or
8
+ npm create nevela@latest my-app
9
+ ```
10
+
11
+ You need PHP 8.3 or newer, Composer, and Node.js 20 or newer.
12
+
13
+ ## What you get
14
+
15
+ ```
16
+ my-app/
17
+ ├─ apps/api/ a Laravel app with Sanctum and Nevela installed
18
+ ├─ apps/web/ the Next.js dashboard, pointed at the API
19
+ └─ scripts/ `dev` runs both together
20
+ ```
21
+
22
+ Then:
23
+
24
+ ```sh
25
+ cd my-app
26
+ pnpm run dev
27
+ ```
28
+
29
+ Open http://localhost:3000/sign-in and sign in as `admin@example.com` with the password `password`. That starter account is in your local database only; add your own with `php artisan nevela:user`.
30
+
31
+ Add your first resource, from the same folder:
32
+
33
+ ```sh
34
+ php nevela resource Product --fields="name:string, sku:string!, price:money"
35
+ ```
36
+
37
+ That writes the Laravel code and the dashboard pages, and creates the table. `php nevela` lists everything else.
38
+
39
+ ## Updating an app later
40
+
41
+ ```sh
42
+ php nevela update
43
+ ```
44
+
45
+ That updates the Laravel package, regenerates, and updates the dashboard files you have not changed. See https://nevela-docs.vercel.app/guides/updating/.
46
+
47
+ ## Options
48
+
49
+ | Option | Meaning |
50
+ |---|---|
51
+ | `--pm <pnpm\|npm\|yarn\|bun>` | Package manager for the dashboard. Default: the one you ran this with. |
52
+ | `--no-install` | Don't install the dashboard's dependencies. |
53
+ | `--no-user` | Don't create the starter account. |
54
+ | `--no-git` | Don't run `git init`. |
55
+ | `--bundled-package` | Use the copy of `nevela/laravel` inside this installer instead of the release on Packagist. |
56
+ | `-y`, `--yes` | Ask nothing. Only the app name is ever asked for. |
57
+
58
+ With npm, put options after `--`: `npm create nevela@latest my-app -- --no-install`.
59
+
60
+ ## How it installs the Laravel package
61
+
62
+ `nevela/laravel` is installed from [Packagist](https://packagist.org/packages/nevela/laravel), at the release that matches this installer's version.
63
+
64
+ If Packagist has no matching release, or you pass `--bundled-package`, the copy that travels inside this installer is placed in `my-app/packages/nevela-laravel` and Composer installs it from there. That is how Nevela's own CI tests a change to the package before it is released.