@apollosproject/web-embeds 0.1.0 → 0.1.3
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 +9 -2
- package/package.json +4 -3
- package/widget/embed.js +40 -165
package/README.md
CHANGED
|
@@ -52,13 +52,20 @@ The simplest way to use the embed is through automatic link interception. Any li
|
|
|
52
52
|
# Install dependencies
|
|
53
53
|
npm install
|
|
54
54
|
|
|
55
|
-
# Start dev server
|
|
55
|
+
# Start dev server (runs inject-config first, then Vite)
|
|
56
56
|
npm run dev
|
|
57
57
|
|
|
58
58
|
# Build for production
|
|
59
59
|
npm run build
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
### Crossroads test page
|
|
63
|
+
|
|
64
|
+
The `public/crossroads-test/` directory contains a demo giving page. The embed base URL and church slug are configurable via env vars:
|
|
65
|
+
|
|
66
|
+
- **Local dev:** Create `.env` in `apps/web-embeds-v2/` (see `.env.example`). Run `npm run inject-config` or `npm run dev` to generate `index.html` from the template.
|
|
67
|
+
- **GitHub Pages:** Set `APOLLOS_EMBED_BASE_URL` and `APOLLOS_EMBED_CHURCH_SLUG` in repo Settings → Variables and secrets → Actions. The workflow deploys on push to `main` when crossroads-test files change. Enable Pages in Settings → Pages → Source: GitHub Actions.
|
|
68
|
+
|
|
62
69
|
## Publishing
|
|
63
70
|
|
|
64
71
|
This app publishes to the npm package **`@apollosproject/web-embeds`** (separate from `@apollosproject/canvas-embeds`).
|
|
@@ -75,7 +82,7 @@ On push to `main`, the GitHub workflow syncs the published version from npm (if
|
|
|
75
82
|
From the repo root (after `yarn` install):
|
|
76
83
|
|
|
77
84
|
1. `cd apps/web-embeds-v2`
|
|
78
|
-
2. Optionally sync to the last published version: `yarn version --
|
|
85
|
+
2. Optionally sync to the last published version: `yarn version --immediate "$(npm show @apollosproject/web-embeds version)"`
|
|
79
86
|
3. Bump the version: `yarn bump` (patch by default, or `yarn bump:prerelease` for prerelease)
|
|
80
87
|
4. Publish: `npm publish` (runs `prepublishOnly` to build and verify)
|
|
81
88
|
5. Purge jsDelivr cache: `yarn flush`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apollosproject/web-embeds",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Next-generation embeddable widget system for Apollos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./widget/embed.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
|
-
"
|
|
15
|
+
"inject-config": "node scripts/inject-embed-config.js",
|
|
16
|
+
"dev": "node scripts/inject-embed-config.js && vite",
|
|
16
17
|
"build": "tsc && vite build && node scripts/build.cjs",
|
|
17
18
|
"preview": "vite preview",
|
|
18
19
|
"type-check": "tsc --noEmit",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"@types/react-dom": "^18.2.0",
|
|
32
33
|
"@vitejs/plugin-react": "^4.2.1",
|
|
33
34
|
"autoprefixer": "^10.4.19",
|
|
34
|
-
"cssnano": "^7.
|
|
35
|
+
"cssnano": "^7.1.2",
|
|
35
36
|
"postcss": "^8.4.38",
|
|
36
37
|
"tailwindcss": "^3.4.3",
|
|
37
38
|
"tailwindcss-scoped-preflight": "^3.5.7",
|