create-spree-app 0.2.2 → 0.3.1

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.
Files changed (3) hide show
  1. package/README.md +33 -5
  2. package/dist/index.js +185 -137
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -36,9 +36,9 @@ npx create-spree-app my-store --backend-only --no-sample-data --no-start
36
36
  ```
37
37
  my-store/
38
38
  ├── docker-compose.yml # Spree backend + Postgres
39
- ├── .env # SECRET_KEY_BASE for Rails
39
+ ├── .env # SECRET_KEY_BASE, port, version tag
40
40
  ├── .gitignore
41
- ├── package.json # Convenience scripts (dev, down, logs, etc.)
41
+ ├── package.json # @spree/cli + convenience scripts
42
42
  ├── README.md # Getting started guide
43
43
  └── apps/
44
44
  └── storefront/ # Next.js app (full-stack mode only)
@@ -73,16 +73,44 @@ Open http://localhost:3001
73
73
 
74
74
  ## Useful Commands
75
75
 
76
- Run these from your project directory:
76
+ Run these from your project directory (powered by [`@spree/cli`](https://www.npmjs.com/package/@spree/cli)):
77
77
 
78
78
  | Command | Description |
79
79
  |---------|-------------|
80
- | `npm run dev` | Start backend services |
81
- | `npm run down` | Stop backend services |
80
+ | `npm run dev` | Start backend services and stream logs |
81
+ | `npm run stop` | Stop backend services |
82
+ | `npm run down` | Stop and remove backend services |
83
+ | `npm run update` | Pull latest Spree image and restart (runs migrations automatically) |
82
84
  | `npm run logs` | View backend logs |
85
+ | `npm run logs:worker` | View background jobs logs |
83
86
  | `npm run console` | Rails console |
87
+ | `npm run seed` | Seed the database |
84
88
  | `npm run load-sample-data` | Load sample products, categories |
85
89
 
90
+ You can also use the CLI directly for additional commands:
91
+
92
+ ```bash
93
+ npx spree user create # Create an admin user
94
+ npx spree api-key create # Create an API key
95
+ npx spree api-key list # List API keys
96
+ ```
97
+
98
+ ## Updating Spree
99
+
100
+ To update to the latest Spree version:
101
+
102
+ ```bash
103
+ npm run update
104
+ ```
105
+
106
+ This pulls the latest Docker image and recreates the containers. The entrypoint automatically runs `db:prepare`, which handles any pending database migrations.
107
+
108
+ To pin a specific version, edit `SPREE_VERSION_TAG` in `.env`:
109
+
110
+ ```
111
+ SPREE_VERSION_TAG=5.4
112
+ ```
113
+
86
114
  ## Learn More
87
115
 
88
116
  - [Spree Documentation](https://docs.spreecommerce.org)