@tryghost/signup-form 0.3.305 → 0.3.307
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 +21 -19
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -20,41 +20,43 @@ This starts the standard development environment and the Signup Form watcher.
|
|
|
20
20
|
|
|
21
21
|
### Running the standalone demo page
|
|
22
22
|
|
|
23
|
-
Run `pnpm dev:standalone`
|
|
24
|
-
|
|
23
|
+
Run `pnpm dev:standalone` from this directory to start the standalone
|
|
24
|
+
development server with HMR. It serves the demo page at
|
|
25
|
+
<http://localhost:6173>.
|
|
25
26
|
|
|
26
27
|
`pnpm dev` on its own (in this package folder) only builds `umd/signup-form.min.js` and watches for changes — it does not bind a port. The UMD is served by Caddy at http://localhost:2368/ghost/assets/signup-form/signup-form.min.js when you run `pnpm dev:public` from the monorepo root.
|
|
27
28
|
|
|
28
29
|
### Using the UMD build during development
|
|
29
30
|
|
|
30
|
-
Vite
|
|
31
|
+
Vite's development server uses an ESM output for HMR. When a script is loaded as
|
|
32
|
+
an ESM module (`<script type="module" src="...">`), `document.currentScript` is
|
|
33
|
+
not available. Signup Form needs it to determine where to inject the iframe, so
|
|
34
|
+
development mode uses a workaround that is not suitable for production.
|
|
31
35
|
|
|
32
|
-
To test the
|
|
36
|
+
To test the production behavior, open <http://localhost:6173/preview.html> while
|
|
37
|
+
`pnpm dev:standalone` is running. The page loads the UMD bundle from the
|
|
38
|
+
development gateway, so `pnpm dev:public` must also be running from the monorepo
|
|
39
|
+
root.
|
|
33
40
|
|
|
34
41
|
## Test
|
|
35
42
|
|
|
36
|
-
- `pnpm lint`
|
|
37
|
-
- `pnpm test:acceptance`
|
|
38
|
-
- `pnpm test:acceptance:slowmo`
|
|
39
|
-
|
|
43
|
+
- `pnpm lint` runs ESLint.
|
|
44
|
+
- `pnpm test:acceptance` runs acceptance tests on Chromium.
|
|
45
|
+
- `pnpm test:acceptance:slowmo` runs acceptance tests headed and slowed down on
|
|
46
|
+
Chromium.
|
|
47
|
+
- `pnpm test:acceptance:full` runs acceptance tests on all configured browsers.
|
|
40
48
|
|
|
41
49
|
## Release
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
In either case, you need sufficient permissions to release `@tryghost` packages on NPM.
|
|
51
|
+
Patch releases are automatic. When Signup Form changes on `main`, CI publishes the next patch version to npm and clears the jsDelivr cache. Sites using that major/minor line receive the patch without a Ghost release.
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
For an intentional minor or major release:
|
|
47
54
|
|
|
48
|
-
1.
|
|
55
|
+
1. From a clean branch, run `pnpm ship` and select a minor or major version
|
|
49
56
|
2. Merge the release commit to `main`
|
|
57
|
+
3. Wait for a public Ghost release to ship the new default version line
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
1. Run `pnpm ship` and select a minor or major version when prompted
|
|
54
|
-
2. Merge the release commit to `main`
|
|
55
|
-
3. Wait until a new version of Ghost is released
|
|
56
|
-
|
|
57
|
-
To use the new version of signup form in Ghost, update the version in Ghost core's default configuration (currently at `core/shared/config/default.json`)
|
|
59
|
+
`pnpm ship` updates both the package version and Ghost's default Signup Form version.
|
|
58
60
|
|
|
59
61
|
# Copyright & License
|
|
60
62
|
|