@ea-lab/reactive-json 0.0.0 → 0.0.1

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 +49 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@ and make them interactive with your backend.
9
9
 
10
10
  ## Content
11
11
 
12
- Lbrary and demo app for *reactive-json*.
12
+ Library and demo app for *reactive-json*.
13
13
 
14
14
  The library can be:
15
15
 
@@ -20,6 +20,44 @@ The library can be:
20
20
 
21
21
  The app shows how to use *reactive-json*.
22
22
 
23
+ ## How to install *reactive-json*
24
+
25
+ ### Standalone mode
26
+
27
+ This mode only needs you to download the `/dist` folder and load the JS and CSS assets
28
+ in your web pages.
29
+
30
+ If the `/dist` is not available (probably because you pulled the library from
31
+ the source code repository), you will have to generate it:
32
+
33
+ ```shell
34
+ npm install && npm run build
35
+ ```
36
+
37
+ ### Library mode
38
+
39
+ This mode is when you have a React project, and you want to include *reactive-json*
40
+ as a part of your project.
41
+
42
+ First, install the lib:
43
+
44
+ ```shell
45
+ npm install @ea-lab/reactive-json
46
+ ```
47
+
48
+ And that's all! The lib files are already included in the `/lib`, ready for use
49
+ in your React components.
50
+
51
+ You will have to use the `<ReactiveJsonRoot>` component, with the appropriate
52
+ options.
53
+
54
+ ## How to extend *reactive-json*
55
+
56
+ To add new components, you must be in library mode. Indeed, the
57
+ standalone mode is a fixed set of functionality. This can be changed later if
58
+ a plugin system can be implemented; do not hesitate to contribute in this
59
+ project if you know how to make it, it would be really appreciated!
60
+
23
61
  ## Project structure
24
62
 
25
63
  This project was bootstrapped with [Vite](https://vite.dev/).
@@ -28,13 +66,14 @@ The following is the specific documentation for the *reactive-json* project.
28
66
 
29
67
  ### Components `/lib/component`
30
68
 
31
- This is where the extensible code is located.
69
+ This is where the main component code is located.
32
70
 
33
71
  We provided a basic set of components that people will mostly need.
34
72
  Those components usually wrap around famous third-party libs such as
35
73
  *React-Bootstrap* and *Chart.js*.
36
74
 
37
- Of course, you can add your own components, by following the same pattern.
75
+ Of course, you can add your own components in your React project,
76
+ by following the same pattern.
38
77
 
39
78
  #### Actions `/lib/component/action`
40
79
 
@@ -71,13 +110,17 @@ Generic reusable code.
71
110
 
72
111
  Contains the core functionality of *reactive-json*.
73
112
 
74
- This is where `ReactiveJsonRoot.jsx`* is.
75
-
76
- (* the main entrypoint component of *reactive-json*.)
113
+ This is where `ReactiveJsonRoot.jsx` is.
77
114
 
78
115
  Usually, you won't need to edit its content. (But feel free to inspect it if you
79
116
  want to contribute!)
80
117
 
118
+ ### Public files `public`
119
+
120
+ This directory contains files for the demo app.
121
+
122
+ This directory is not included in the build.
123
+
81
124
  ### Demo app `src`
82
125
 
83
126
  All the demo app related code is here. This code is not included in the build.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ea-lab/reactive-json",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",