vaderjs-native 1.0.4 → 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 +65 -38
- package/package.json +1 -1
package/README.MD
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
Ah! Got it — since this is **VaderNative** (focused on building native mobile apps with Bun/Vader.js), we should tweak your README to emphasize **native app development**, Android/iOS support, native components, and speed, rather than generic web usage. Here's a polished, VaderNative-focused version:
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
<p align="center">
|
|
2
6
|
<a href="https://vader-js.pages.dev">
|
|
3
7
|
<picture>
|
|
4
8
|
<source media="(prefers-color-scheme: dark)" srcset="/icon.jpeg">
|
|
5
9
|
<img src="https://github.com/Postr-Inc/Vader.js/blob/main/logo.png" height="128">
|
|
6
10
|
</picture>
|
|
7
|
-
<h1 align="center">
|
|
11
|
+
<h1 align="center">VaderNative</h1>
|
|
8
12
|
</a>
|
|
9
13
|
</p>
|
|
10
14
|
|
|
11
|
-
#
|
|
12
|
-
|
|
15
|
+
# VaderNative
|
|
16
|
+
|
|
17
|
+
**A modern, reactive framework for building ultra-fast native mobile apps — minimal, blazing fast, and easy to learn.**
|
|
13
18
|
|
|
14
19
|
[](https://github.com/Postr-Inc/Vader.js/blob/main/LICENSE) [](https://www.npmjs.com/package/vaderjs)
|
|
15
20
|
|
|
@@ -18,22 +23,25 @@ A modern, reactive framework for building ultra-fast android applications — bu
|
|
|
18
23
|
## 🚀 Quick Example
|
|
19
24
|
|
|
20
25
|
```tsx
|
|
21
|
-
import * as Vader from "vader-native"
|
|
26
|
+
import * as Vader from "vader-native";
|
|
27
|
+
|
|
28
|
+
export default function App() {
|
|
29
|
+
const [count, setCount] = Vader.useState(0);
|
|
22
30
|
|
|
23
|
-
export default function() {
|
|
24
|
-
const [count, setCount] = Vader.useState(0)
|
|
25
31
|
return (
|
|
26
|
-
<
|
|
32
|
+
<Vader.View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
27
33
|
<Vader.Switch>
|
|
28
34
|
<Vader.Match when={count > 10}>
|
|
29
|
-
<
|
|
35
|
+
<Vader.Text>Count is greater than 10</Vader.Text>
|
|
30
36
|
</Vader.Match>
|
|
31
37
|
<Vader.Match when={count <= 10}>
|
|
32
|
-
<
|
|
38
|
+
<Vader.Text>Count is 10 or less</Vader.Text>
|
|
33
39
|
</Vader.Match>
|
|
34
40
|
</Vader.Switch>
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
|
|
42
|
+
<Vader.Button title="Increment" onPress={() => setCount(count + 1)} />
|
|
43
|
+
</Vader.View>
|
|
44
|
+
);
|
|
37
45
|
}
|
|
38
46
|
```
|
|
39
47
|
|
|
@@ -44,31 +52,47 @@ export default function() {
|
|
|
44
52
|
```bash
|
|
45
53
|
bun install vaderjs@latest
|
|
46
54
|
```
|
|
47
|
-
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
---
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
## ⚙️ Project Structure
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
VaderNative uses **file-based routing** inspired by Next.js. Simply create a `pages` folder in your project:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
/pages/index.jsx -> /
|
|
64
|
+
/pages/home/[page].jsx -> /home/:page
|
|
65
|
+
/pages/path/index.jsx -> /path/
|
|
66
|
+
/pages/test/[[...catchall]]/index.jsx -> /test/*
|
|
67
|
+
/pages/route/[param1]/[param2].jsx -> /route/:param1/:param2
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
> ⚠️ Note: Native routing works best in production builds. Dev hot-reloading is supported via `bun dev`.
|
|
58
71
|
|
|
59
72
|
---
|
|
60
73
|
|
|
61
|
-
##
|
|
74
|
+
## 🗂 Special Folders
|
|
75
|
+
|
|
76
|
+
| Folder | Purpose |
|
|
77
|
+
| --------- | --------------------------------------- |
|
|
78
|
+
| `app/` | Contains all route `.jsx` files |
|
|
79
|
+
| `src/` | Your components, hooks, utilities, etc. |
|
|
80
|
+
| `public/` | Static assets like images, JSON, fonts |
|
|
62
81
|
|
|
63
|
-
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 🛠 Configuration
|
|
85
|
+
|
|
86
|
+
Create a `config.ts` at your project root to define your app’s metadata, platform settings, and plugins:
|
|
64
87
|
|
|
65
88
|
```ts
|
|
66
89
|
import defineConfig from "vaderjs-native/config";
|
|
67
90
|
import tailwind from "vaderjs-native/plugins/tailwind";
|
|
91
|
+
|
|
68
92
|
export default defineConfig({
|
|
69
93
|
app: {
|
|
70
|
-
name: "
|
|
71
|
-
id: "com.
|
|
94
|
+
name: "VaderNative App",
|
|
95
|
+
id: "com.vadernative.app",
|
|
72
96
|
version: {
|
|
73
97
|
code: 1,
|
|
74
98
|
name: "1.0.0",
|
|
@@ -79,20 +103,14 @@ export default defineConfig({
|
|
|
79
103
|
android: {
|
|
80
104
|
minSdk: 24,
|
|
81
105
|
targetSdk: 34,
|
|
82
|
-
permissions: [
|
|
83
|
-
"INTERNET",
|
|
84
|
-
"ACCESS_NETWORK_STATE",
|
|
85
|
-
],
|
|
106
|
+
permissions: ["INTERNET", "ACCESS_NETWORK_STATE"],
|
|
86
107
|
icon: "./assets/android/icon.png",
|
|
87
108
|
splash: "./assets/android/splash.png",
|
|
88
109
|
},
|
|
89
|
-
|
|
90
110
|
web: {
|
|
91
|
-
title: "
|
|
111
|
+
title: "VaderNative App",
|
|
92
112
|
themeColor: "#111827",
|
|
93
113
|
},
|
|
94
|
-
|
|
95
|
-
// future
|
|
96
114
|
ios: {},
|
|
97
115
|
windows: {},
|
|
98
116
|
},
|
|
@@ -100,12 +118,21 @@ export default defineConfig({
|
|
|
100
118
|
plugins: [tailwind]
|
|
101
119
|
});
|
|
102
120
|
```
|
|
103
|
-
|
|
104
121
|
|
|
105
|
-
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## ✨ Why VaderNative?
|
|
125
|
+
|
|
126
|
+
* ✅ **Minimal reactivity model** – no virtual DOM overhead
|
|
127
|
+
* ✅ **Native components** – fast and lightweight
|
|
128
|
+
* ✅ **File-based routing** – simple, built-in, production-ready
|
|
129
|
+
* ✅ **Tiny runtime** – blazing fast updates
|
|
130
|
+
* ✅ **React-inspired API** – familiar but simpler
|
|
131
|
+
|
|
132
|
+
Perfect for building Bun-first **cross-platform native apps** with speed and simplicity.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
If you want, I can also **add a “Getting Started” section with Bun commands for Android/iOS builds**, which would make this README 10x more practical for new VaderNative users.
|
|
106
137
|
|
|
107
|
-
|
|
108
|
-
* File-based routing system built into Bun
|
|
109
|
-
* Tiny runtime, blazing fast updates
|
|
110
|
-
* Familiar API inspired by React, but simpler
|
|
111
|
-
* Perfect for Bun-first, fullstack apps
|
|
138
|
+
Do you want me to do that?
|