You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+85-1Lines changed: 85 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,86 @@
2
2
An npm library for Control Systems web applications
3
3
4
4
## Installation
5
+
6
+
:warning: cs-web-lib is **NOT** compatible with projects using create-react-app. Vite should be used instead.
7
+
5
8
Install via npm:
6
9
`npm install @diamondlightsource/cs-web-lib`
7
-
10
+
11
+
We use React 18. cs-web-lib requires several environment variables to be set in order to connect to PVWS and fetch PV value updates.
12
+
13
+
-`VITE_PVWS_SOCKET` - point to the server hosting the PVWS application.
14
+
-`VITE_PVWS_SSL` - set this to false if running a local PVWS instance e.g. localhost:8080 without SSL, otherwise true
15
+
16
+
These should be provided in a .env file at the root of your project.
17
+
18
+
Inside your application, create a screen by passing a .opi, .bob or .json file to the EmbeddedDisplay widget.
19
+
20
+
## Legacy Installation
21
+
22
+
PVWS was introduced in version 0.4.0. Versions prior to this used [Coniql](https://github.com/DiamondLightSource/coniql), and the .env variables used were `VITE_CONIQL_SOCKET` and `VITE_CONIQL_SSL`.
23
+
24
+
React 17 was supported until version < 0.5.0.
25
+
26
+
## Features
27
+
28
+
cs-web-lib does not contain the full suite of features and widgets provided by Phoebus. The tables below describes which features are currently included, are planned to be added, and which will not be added.
| Actions |✅| Some actions may not be supported. Please open an issue for any issues noticed. |
81
+
| Formulas |❌|`sim://` PVs are supported, but not `eq://`. This will be added in future. |
82
+
| Rules |✅| Partial support. x, y and Font rules are currently not supported. This will be added in future. Please open an issue for any issues noticed.|
83
+
| Scripts |❌| The use of scripting is recommended against in general by CS Studio Developers. Formulae should be able to handle most use cases. |
84
+
8
85
## Development
9
86
To develop on the library code first clone this repo, install the npm package dependencies and then make changes:
10
87
@@ -17,6 +94,13 @@ Before pushing any changes check that the update code conforms to the formatter
17
94
npm run all-checks
18
95
npm run tests
19
96
97
+
If making changes to the build process, check that the package is built correctly with:
98
+
99
+
npm run rollup
100
+
npm pack
101
+
102
+
You can then install the generated tar.gz file into another project and check that all functionality expected is there.
103
+
20
104
### Publishing to NPM (PREFERRED METHOD)
21
105
A GitHub workflow has been setup to automatically publish a new package version to the NPM registry on the push of a new tag. This should be used as the preferred method of release a new package.
22
106
1. Update/increase the package version in package.json (see https://docs.npmjs.com/cli/v8/commands/npm-version for further details on this npm command):
0 commit comments