@xplor-education/react-wrappers 2.0.2 → 3.0.0

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 ADDED
@@ -0,0 +1,98 @@
1
+ # @xplor-education/react-wrappers
2
+
3
+ React component wrappers for the [Xplor Design System](../core-stencil-components), built on top of `@xplor-education/core-stencil-components`.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @xplor-education/react-wrappers
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { XpButton, XpDatatable } from '@xplor-education/react-wrappers';
15
+
16
+ function App() {
17
+ return (
18
+ <div>
19
+ <XpButton label="Click me" />
20
+ </div>
21
+ );
22
+ }
23
+ ```
24
+
25
+ ### Peer Dependencies
26
+
27
+ - `react` ^18.0.0 || ^19.0.0
28
+
29
+ ## Development
30
+
31
+ ### Build
32
+
33
+ ```bash
34
+ pnpm run build
35
+ ```
36
+
37
+ ### Clean
38
+
39
+ ```bash
40
+ pnpm run clean
41
+ ```
42
+
43
+ ## Publishing to NPM
44
+
45
+ ### 1. Authenticate with NPM
46
+
47
+ ```bash
48
+ npm login
49
+ ```
50
+
51
+ If using a scoped registry or org, ensure your `.npmrc` is configured.
52
+
53
+ ### 2. Bump the version
54
+
55
+ ```bash
56
+ # Choose one:
57
+ npm version patch # e.g. 2.0.2 → 2.0.3
58
+ npm version minor # e.g. 2.0.2 → 2.1.0
59
+ npm version major # e.g. 2.0.2 → 3.0.0
60
+ ```
61
+
62
+ ### 3. Build the project
63
+
64
+ ```bash
65
+ pnpm run build
66
+ ```
67
+
68
+ > This runs automatically before publish via the `prepublishOnly` script.
69
+
70
+ ### 4. (Optional) Preview what will be published
71
+
72
+ ```bash
73
+ npm pack --dry-run
74
+ ```
75
+
76
+ This shows exactly which files will be included. The `files` field limits it to `dist/`.
77
+
78
+ ### 5. Publish to NPM
79
+
80
+ ```bash
81
+ npm publish
82
+ ```
83
+
84
+ Since `publishConfig.access` is set to `"public"` and `private` is `false`, this will publish the scoped package publicly.
85
+
86
+ To do a dry-run first:
87
+
88
+ ```bash
89
+ npm publish --dry-run
90
+ ```
91
+
92
+ ### 6. Push the version tag to git
93
+
94
+ ```bash
95
+ git push && git push --tags
96
+ ```
97
+
98
+ `npm version` creates a git commit and tag automatically.