@tryghost/portal 1.12.6 → 1.13.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013-2021 Ghost Foundation
3
+ Copyright (c) 2013-2022 Ghost Foundation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -3,11 +3,11 @@
3
3
  [![CI Status](https://github.com/TryGhost/portal/workflows/Test/badge.svg?branch=main)](https://github.com/TryGhost/portal/actions)
4
4
  [![npm version](https://badge.fury.io/js/%40tryghost%2Fportal.svg)](https://badge.fury.io/js/%40tryghost%2Fportal)
5
5
 
6
- Drop-in script to make the bulk of Ghost membership features work on any theme.
6
+ [Drop-in script](https://ghost.org/help/setting-up-portal/) to make the bulk of Ghost membership features work on any theme.
7
7
 
8
8
  ## Usage
9
9
 
10
- Ghost automatically injects this Portal script on all sites running Ghost 4 or higher.
10
+ Ghost automatically injects Portal script on all sites running Ghost 4 or higher.
11
11
 
12
12
  Alternatively, Portal can be enabled on non-ghost pages directly by inserting the below script on the page.
13
13
 
@@ -15,7 +15,7 @@ Alternatively, Portal can be enabled on non-ghost pages directly by inserting th
15
15
  <script defer src="https://unpkg.com/@tryghost/portal@latest/umd/portal.min.js" data-ghost="https://mymemberssite.com"></script>
16
16
  ```
17
17
 
18
- The `data-ghost` attribute expects the URL for your site, which is the only input Portal needs to work with your site's membership data via Ghost APIs.
18
+ The `data-ghost` attribute expects the URL for your Ghost site, which is the only input Portal needs to work with your site's membership data via Ghost APIs.
19
19
 
20
20
  ### Custom trigger button
21
21
 
@@ -25,6 +25,8 @@ Its possible to add custom trigger button of your own by adding data attribute `
25
25
 
26
26
  The script also adds custom class names to this element for open and close state of popup - `gh-portal-open` and `gh-portal-close`, allowing devs to update its UI based on popup state.
27
27
 
28
+ Refer the [docs](https://ghost.org/help/setup-members/#customize-portal-settings) to read about ways in which Portal can be customized for your site.
29
+
28
30
  ## Basic Setup
29
31
 
30
32
  1. Clone this repository:
@@ -40,29 +42,15 @@ cd portal
40
42
  yarn
41
43
  ```
42
44
 
43
- ## Configure for local development
44
-
45
- Only useful for active UI development without publishing a version on unpkg. Always use the unpkg link for testing latest released portal script.
46
-
47
- #### In this repo(Portal):
48
-
49
- - Run `yarn build` to create the minified bundle with your changes at `umd/portal.min.js`
45
+ ## For local development
50
46
 
51
- #### In your theme(Ex. Lyra):
47
+ This section is mostly relevant for core team only for active Portal development. Always use the unpkg link for testing/using latest released portal script.
52
48
 
53
- - Copy `portal.min.js` from above and paste it in your theme at `assets/built/portal.min.js`
54
-
55
- #### In Ghost repo
56
-
57
- - Update your `config.local.json` to add "portal" config which points url to the locally built copy.
58
-
59
- ```json
60
- ...,
61
- "portal": {
62
- "url": "SITE_URL/assets/built/portal.min.js"
63
- },
64
- ...
65
- ```
49
+ - Run `yarn start:dev` to start Portal in development mode
50
+ - Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
51
+ - To use the local Portal script in a local Ghost site
52
+ - Update `config.local.json` in Ghost repo to add "portal" config pointing to local dev server url as instructed on terminal.
53
+ - By default, this uses port `5368` for loading local Portal script on Ghost site. It's also possible to specify a custom port when running the script using - `--port=xxxx`.
66
54
 
67
55
  ## Available Scripts
68
56
 
@@ -104,4 +92,4 @@ You can learn more in the [Create React App documentation](https://facebook.gith
104
92
 
105
93
  # Copyright & License
106
94
 
107
- Copyright (c) 2013-2021 Ghost Foundation - Released under the [MIT license](LICENSE).
95
+ Copyright (c) 2013-2022 Ghost Foundation - Released under the [MIT license](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/portal",
3
- "version": "1.12.6",
3
+ "version": "1.13.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,9 +18,9 @@
18
18
  "registry": "https://registry.npmjs.org/"
19
19
  },
20
20
  "dependencies": {
21
- "@sentry/react": "6.13.3",
22
- "@sentry/tracing": "6.13.3",
23
- "@testing-library/jest-dom": "5.14.1",
21
+ "@sentry/react": "6.16.1",
22
+ "@sentry/tracing": "6.16.1",
23
+ "@testing-library/jest-dom": "5.16.1",
24
24
  "@testing-library/react": "12.1.2",
25
25
  "@testing-library/user-event": "13.5.0",
26
26
  "react": "17.0.2",
@@ -75,13 +75,13 @@
75
75
  ]
76
76
  },
77
77
  "devDependencies": {
78
- "chalk": "4.1.1",
78
+ "chalk": "4.1.2",
79
79
  "chokidar": "3.5.2",
80
80
  "copy-webpack-plugin": "6.4.1",
81
- "eslint-plugin-ghost": "2.6.0",
81
+ "eslint-plugin-ghost": "2.11.0",
82
82
  "minimist": "1.2.5",
83
83
  "ora": "5.4.1",
84
- "rewire": "5.0.0",
84
+ "rewire": "6.0.0",
85
85
  "serve-handler": "6.1.3",
86
86
  "source-map-explorer": "2.5.2",
87
87
  "webpack-cli": "3.3.12"