@scripso-homepad/ui 0.2.0 → 0.2.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.
- package/README.md +36 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,14 +8,48 @@ Cross-platform UI component library for Homepad. Components use React Native pri
|
|
|
8
8
|
npm install @scripso-homepad/ui react react-native
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
### React Web
|
|
11
|
+
### React Web
|
|
12
12
|
|
|
13
|
-
Also install `react-native-web
|
|
13
|
+
Also install `react-native-web`:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
npm install react-native-web
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Alias `react-native` → `react-native-web` in your bundler.
|
|
20
|
+
|
|
21
|
+
#### Vite (React)
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
// vite.config.ts
|
|
25
|
+
import { defineConfig } from "vite";
|
|
26
|
+
import react from "@vitejs/plugin-react";
|
|
27
|
+
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
plugins: [react()],
|
|
30
|
+
resolve: {
|
|
31
|
+
alias: {
|
|
32
|
+
"react-native": "react-native-web",
|
|
33
|
+
},
|
|
34
|
+
extensions: [
|
|
35
|
+
".web.tsx",
|
|
36
|
+
".web.ts",
|
|
37
|
+
".web.jsx",
|
|
38
|
+
".web.js",
|
|
39
|
+
".tsx",
|
|
40
|
+
".ts",
|
|
41
|
+
".jsx",
|
|
42
|
+
".js",
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
optimizeDeps: {
|
|
46
|
+
include: ["react-native-web", "@scripso-homepad/ui"],
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Next.js
|
|
52
|
+
|
|
19
53
|
```js
|
|
20
54
|
// next.config.js
|
|
21
55
|
module.exports = {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scripso-homepad/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cross-platform UI components for Homepad (React Web + React Native)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Homepad",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/Home-Pad/homepad-ui.git"
|
|
10
|
+
"url": "git+https://github.com/Home-Pad/homepad-ui.git"
|
|
11
11
|
},
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|