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
A singular runtime dependency for applications on the DHIS2 platform
1
+
# DHIS2 Application Runtime
3
2
4
-
**WORK IN PROGRESS, DO NOT USE**
3
+
See [@dhis2/app-runtime](./runtime) in the `./runtime` directory for installation and usage.
4
+
5
+
## Development
6
+
7
+
```sh
8
+
> yarn test# runs yarn test on each directory under ./services, and also in ./runtime
9
+
> yarn build # runs yarn test on each directory under ./services, and then in ./runtime
10
+
```
11
+
12
+
## Example
13
+
14
+
A `create-react-app` example is available at [./examples/cra](./examples/cra). Be sure to run `yarn build` in _this_ directory before installing in the example directory:'
15
+
16
+
```sh
17
+
> yarn build
18
+
>cd examples/cra && yarn start
19
+
# visit http://localhost:3000
20
+
# login to https://play.dhis2.org/dev to allow the example to retrieve data
21
+
```
22
+
23
+
## Release
24
+
25
+
Releases run automatically for every commit to the master branch using the [d2 cli](https://github.com/dhis2/cli).
26
+
27
+
**NEVER PUSH DIRECTLY TO `master`! ALL DEVELOPMENT IN THIS REPOSITORY IS THROUGH PULL REQUESTS**
A singular runtime dependency for applications on the DHIS2 platform
4
+
5
+
## Installation
6
+
7
+
```sh
8
+
yarn add @dhis2/app-runtime
9
+
```
10
+
11
+
**NB** Please ensure that all webpack bundles reference the same Context, you can do this by adding `@dhis2/app-runtime` to `peerDependencies` (rather than `dependencies`) and webpack `externals` for _library_ builds. Top-level web applications should be able to include the dependency directly
12
+
13
+
This library uses the official React Context API (introduced in 16.3) and React Hooks (introduced in 16.8), so **React >= 16.8 is required** to use it
14
+
15
+
## Usage
16
+
17
+
The `@dhis2/app-runtime` library is a thin wrapper around application services. See each service's README for usage instructions. Currently, the included services are:
18
+
19
+
-[data](../services/data) - declarative data fetching for DHIS2 api queries
Copy file name to clipboardExpand all lines: services/data/README.md
+20-26Lines changed: 20 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,35 +2,29 @@
2
2
3
3
## Installation
4
4
5
-
```sh
6
-
yarn add @dhis2/app-service-data # ONCE THIS IS PUBLISHED, IT'S NOT YET
7
-
```
8
-
9
-
**NB** Please ensure that all webpack bundles reference the same Context, you can do this by adding `@dhis2/app-service-data` to `peerDependencies` (rather than `dependencies`) and webpack `externals` for _library_ builds. Top-level apps should be able to include the dependency directly
10
-
11
-
This library uses the official React Context API (introduced in 16.3) and React Hooks (introduced in 16.8), so **React >= 16.8 is required** to use it
5
+
This package is internal to `@dhis2/app-runtime` and should not be installed independently. `@dhis2/app-service-data` is not currently published to `npm`. Please install `@dhis2/app-runtime` instead.
12
6
13
7
## Usage
14
8
15
9
At the top-level application entry point (i.e. `index.js` in Create React App configurations)
0 commit comments