zappie 0.1.7 → 0.2.0
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/CHANGELOG.md +12 -0
- package/README.md +17 -2
- package/dist/cli.js +24 -1960
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# zappie
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 88f52b6: `zappie init` adds Zappie to an existing React Router, Next.js or Vite project. Run it in a folder with a `package.json` and it installs `@zappie/sdk`, `@zappie/foundations` and `@zappie/tokens` with your package manager, adds the `provider` component, writes `zappie.json`, and adds your store and test key to `.env.local` as `VITE_ZAPPIE_*` or, in Next.js, `NEXT_PUBLIC_ZAPPIE_*`. A value already set in `.env`, `.env.local` or `.env.development(.local)` stays, and init writes no key unless you pass `--key`. It prints the code that wraps your app in `ZappieProvider` and the file it goes in, and `--json` returns both as `wrap`. `--no-install` skips the install and prints the command instead. Init still creates a storefront from the starter in a new or empty folder.
|
|
8
|
+
|
|
9
|
+
## 0.1.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 0b31798: `zappie verify --start` accepts a start path with `{menu}` or `{branch}` once `@zappie/verify` reports that it filled it in. An older `@zappie/verify` opens the path as written, so the command fails and asks for `@zappie/verify` 0.3.1 or later.
|
|
14
|
+
|
|
3
15
|
## 0.1.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ npm run dev
|
|
|
50
50
|
npm run check
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
Choose a new or empty folder
|
|
53
|
+
Choose a new or empty folder for the starter.
|
|
54
54
|
The React Router starter comes from `https://registry.zappie.ai/v1`.
|
|
55
55
|
Use `--registry <url|dir>` to choose another registry, or `--json` for a
|
|
56
56
|
machine-readable result. Init checks the archive hash before writing files.
|
|
@@ -58,4 +58,19 @@ machine-readable result. Init checks the archive hash before writing files.
|
|
|
58
58
|
Without `--yes`, init asks for missing values in a terminal. Pass `--store`
|
|
59
59
|
when using `--yes` or `--json`. If you leave out the key, set your test
|
|
60
60
|
publishable key in `.dev.vars` before starting. Init refuses live and secret
|
|
61
|
-
keys. It
|
|
61
|
+
keys. It doesn't install the starter's dependencies for you.
|
|
62
|
+
|
|
63
|
+
## Add Zappie to a project
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
cd my-app
|
|
67
|
+
npx zappie init --store my-store --key pk_test_YOUR_KEY --yes
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Run init in a React Router, Next.js or Vite project with a `package.json`, and it:
|
|
71
|
+
|
|
72
|
+
- installs `@zappie/sdk`, `@zappie/foundations` and `@zappie/tokens` with your package manager, unless you pass `--no-install`
|
|
73
|
+
- adds the `provider` component and records it in `zappie.json`
|
|
74
|
+
- adds your store and test key to `.env.local`, as `VITE_ZAPPIE_STORE` and `VITE_ZAPPIE_KEY`, or `NEXT_PUBLIC_ZAPPIE_STORE` and `NEXT_PUBLIC_ZAPPIE_KEY` in Next.js. A value already set in `.env`, `.env.local`, `.env.development` or `.env.development.local` stays, and init writes no key unless you pass `--key`.
|
|
75
|
+
|
|
76
|
+
It then prints the code that wraps your app in `ZappieProvider`, and the file to put it in. If your provider has local changes, init stops before installing anything.
|