@storecraft/dashboard 1.0.3 → 1.0.5

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
@@ -1,16 +1,23 @@
1
1
  # **Storecraft** Official Dashboard
2
- A `storecraft` dashboard, leveraging `static rendering` / `client side rendering` / `swr`,
3
- so it can be deployed into cost effective **CDN**.
4
2
 
5
- Effectively, two build targets:
6
- 1. A website, with configurable backend endpoint
7
- 2. A `library` with
3
+ The Official `storecraft` Dashboard 🏆,
4
+ - Leveraging `static rendering` / `client side rendering` / `swr`
5
+ - Can be deployed into cost effective **CDN**
6
+ - Also available at `jsDelivr` **CDN**
7
+
8
+ Effectively, **TWO** Build Targets
9
+ 1. A `library` with
8
10
  - Dashboard as `react` functional component
9
11
  - a `mount` function, that you can wrap for any framework of pure DOM.
12
+ 2. A website, with configurable backend endpoint.
10
13
 
11
14
  Build is handled by `Vite`
12
15
 
13
16
 
17
+ ```bash
18
+ npm i @storecraft/core
19
+ ```
20
+
14
21
  ## Development
15
22
 
16
23
  First, run the development server:
@@ -48,6 +55,45 @@ dist
48
55
 
49
56
  ```
50
57
 
58
+ ## Consuming via `React`
59
+
60
+ First,
61
+
62
+ ```bash
63
+ npm i @storecraft/dashboard
64
+ ```
65
+
66
+ Then,
67
+
68
+ ```jsx
69
+ import { Dashboard } from '@storecraft/dashboard'
70
+
71
+ export const Root = () => {
72
+
73
+ return (
74
+ <div className='w-screen h-screen'>
75
+ <Dashboard />
76
+ </div>
77
+ )
78
+ }
79
+
80
+ ```
81
+
82
+ ## Consuming via `jsDelivr`
83
+
84
+ ```html
85
+ <script id='_storecraft_script_' type="module">
86
+
87
+ import { mountStorecraftDashboard } from 'https://cdn.jsdelivr.net/npm/@storecraft/dashboard@latest/dist/lib/index.min.js';
88
+
89
+ mountStorecraftDashboard(
90
+ document.getElementById('root'), false
91
+ );
92
+
93
+ </script>
94
+
95
+ ```
96
+
51
97
 
52
98
  ```txt
53
99
  Author: Tomer Shalev