@myrmidon/gve-snapshot-rendition 0.0.3 → 0.0.4

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 CHANGED
@@ -29,7 +29,7 @@ Conceptual documentation and sample data:
29
29
  - [rendition description](docs/rendition.md): details about the architecture and logic of this component.
30
30
  - [sample request to backend snapshot processor](docs/sample/request.json): the request used to generate our sample data via backend. This is used only when we want to change our sample data.
31
31
  - [sample response from backend snapshot processor](docs/sample/response.json): the response received from backend corresponding to our request. This is used only when we want to change our sample data.
32
- - [data used in the demo](data.json): the data loaded in the web component to test it. This is copied from [response.json](docs/sample/response.json), and contains all the data received by the web component for rendering.
32
+ - data used in the demo are found in the `data` folder. Each sample has 3 files for base text, data received from backend service, and settings. For the default sample, data is copied from [response.json](docs/sample/response.json). These represent all the data received by the web component for rendering.
33
33
  - [features adapter services](docs/adapter.md): complementary services independent from the GVE snapshot rendition component, possibly used to adapt data before passing it to the component.
34
34
 
35
35
  The test page used in this project is `index.html` and its code is `consumer.js`. The data model is `CharChainResult` and it is found with all the imported models in `models.ts`. These are the models imported from another package and should not be touched.
@@ -56,6 +56,8 @@ pnpm run start:designer
56
56
 
57
57
  This will build the component and open the hint designer in your browser.
58
58
 
59
+ >If you want to pick a different sample, add it to the URL with a `sample` argument, e.g. <localhost:3000?sample=h5-48>.
60
+
59
61
  ## Quick Start
60
62
 
61
63
  To start working with this code:
@@ -64,12 +66,12 @@ To start working with this code:
64
66
  2. download dependencies with `pnpm i`.
65
67
  3. run with `pnpm start`.
66
68
 
67
- Note: if you need to **update sample data**, follow these steps:
69
+ 💡 Note: if you need to **update sample data**, follow these steps:
68
70
 
69
- 1. open the GVE backend solution and run the demo.
71
+ 1. open the [GVE backend solution](https://github.com/vedph/gve-core) and run the demo.
70
72
  2. set text and operations as you want (to start with the current data, pick the "rendition features" preset).
71
73
  3. click the "build request" button.
72
- 4. paste the request in [docs/sample/request.json](docs/sample/request.json) if you want to make it the default data.
74
+ 4. optionally, paste the request in [docs/sample/request.json](docs/sample/request.json) if you want to make it the default data.
73
75
  5. run the GVE backend API and use Postman or similar to send the request body with this header:
74
76
 
75
77
  ```txt
@@ -151,3 +153,10 @@ Package structure:
151
153
  ├── README.md
152
154
  └── LICENSE
153
155
  ```
156
+
157
+ ## Deploy Demo at Surge
158
+
159
+ To deploy demo in surge:
160
+
161
+ 1. run the script for the demo you want to create (`deploy-demo.ps1` or `deploy-hint-demo.ps1`).
162
+ 2. in the created folder, run `surge`, enter your credentials, confirm the local source directory, and specify a URL to use (e.g. <http://gve-hint-designer.surge.sh/>).