@ea-lab/reactive-json 0.0.1 → 0.0.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.
Files changed (2) hide show
  1. package/README.md +24 -7
  2. package/package.json +5 -1
package/README.md CHANGED
@@ -7,18 +7,22 @@ This lib lessens the need to write JS code for building frontend apps.
7
7
  With *reactive-json*, build your apps and forms frontend, embed them into your websites,
8
8
  and make them interactive with your backend.
9
9
 
10
- ## Content
10
+ TODO: make and insert a descriptive image.
11
11
 
12
- Library and demo app for *reactive-json*.
12
+ ## How to use *reactive-json*
13
13
 
14
14
  The library can be:
15
15
 
16
- - included in your React project: use the provided `<ReactiveJsonRoot>` component
17
- in your React app. This is the way to go if you want to use reactive-json plugins.
18
16
  - used as a standalone lib: simply load the dist files in your web page
19
17
  and it will work on the `<reactive-json>` HTML tags.
18
+ - included in your React project: use the provided `<ReactiveJsonRoot>` component
19
+ in your React app. This is the way to go if you want to use reactive-json plugins.
20
20
 
21
- The app shows how to use *reactive-json*.
21
+ If you retrieved the source code of *reactive-json*, a demo app is available for use.
22
+
23
+ ```shell
24
+ npm run dev
25
+ ```
22
26
 
23
27
  ## How to install *reactive-json*
24
28
 
@@ -45,12 +49,25 @@ First, install the lib:
45
49
  npm install @ea-lab/reactive-json
46
50
  ```
47
51
 
48
- And that's all! The lib files are already included in the `/lib`, ready for use
49
- in your React components.
52
+ And that's all!
50
53
 
51
54
  You will have to use the `<ReactiveJsonRoot>` component, with the appropriate
52
55
  options.
53
56
 
57
+ ```js
58
+ import {ReactiveJsonRoot} from "@ea-lab/reactive-json";
59
+
60
+ //...
61
+
62
+ const YourComponent = () => {
63
+ return (
64
+ <div>
65
+ <ReactiveJsonRoot dataUrl={"/path/to/build.json"}/>
66
+ </div>
67
+ );
68
+ };
69
+ ```
70
+
54
71
  ## How to extend *reactive-json*
55
72
 
56
73
  To add new components, you must be in library mode. Indeed, the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ea-lab/reactive-json",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -12,6 +12,10 @@
12
12
  ".": {
13
13
  "require": "./dist/reactive-json.umd.cjs",
14
14
  "import": "./dist/reactive-json.js"
15
+ },
16
+ "./lib/engine/*": {
17
+ "require": "./dist/lib/engine/*.umd.cjs",
18
+ "import": "./dist/lib/engine/*.js"
15
19
  }
16
20
  },
17
21
  "scripts": {