vaderjs 2.3.14 → 2.3.15

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 DELETED
@@ -1,99 +0,0 @@
1
- <p align="center">
2
- <a href="https://vader-js.pages.dev">
3
- <picture>
4
- <source media="(prefers-color-scheme: dark)" srcset="/icon.jpeg">
5
- <img src="https://github.com/Postr-Inc/Vader.js/blob/main/logo.png" height="128">
6
- </picture>
7
- <h1 align="center">Vader.js</h1>
8
- </a>
9
- </p>
10
-
11
- # Vader.js
12
- A modern, reactive framework for building ultra-fast web applications — built on simplicity and speed.
13
-
14
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Postr-Inc/Vader.js/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/vaderjs.svg?style=flat)](https://www.npmjs.com/package/vaderjs)
15
-
16
- ---
17
-
18
- ## 🚀 Quick Example
19
-
20
- ```tsx
21
- import { useState, Switch, Match } from "vaderjs"
22
-
23
- export default function() {
24
- const [count, setCount] = useState(0)
25
- return (
26
- <div>
27
- <Switch>
28
- <Match when={count > 10}>
29
- <h1>Count is greater than 10</h1>
30
- </Match>
31
- <Match when={count <= 10}>
32
- <h1>Count is less than or equal to 10</h1>
33
- </Match>
34
- </Switch>
35
- </div>
36
- )
37
- }
38
- ```
39
-
40
- ---
41
-
42
- ## 📦 Installation
43
-
44
- ```bash
45
- bun install vaderjs@latest
46
- ```
47
-
48
- ## ⚙️ Project Structure
49
-
50
- Vader.js supports file-based routing out of the box. Just create a `pages` folder like in Next.js:
51
-
52
- > ⚠️ Note: This routing system is designed for **production servers** only. It will not work with Cloudflare Pages, GitHub Pages, or Vercel.
53
-
54
- You can nest up to 4 levels deep.
55
-
56
- ```
57
- /pages/index.jsx -> /
58
- /pages/home/[page].jsx -> /home/:page
59
- /pages/path/index.jsx -> /path/
60
- /pages/test/[[...catchall]]/index.jsx -> /test/*
61
- /pages/route/[param1]/[param2].jsx -> /route/:param1/:param2
62
- ```
63
-
64
- ---
65
-
66
- ## 🗂 Keyword Folders
67
-
68
- Certain folders are special and automatically picked up by the bundler:
69
-
70
- | Folder | Purpose |
71
- | --------- | ----------------------------------- |
72
- | `app/` | Contains all route `.jsx` files |
73
- | `src/` | Your components, utilities, etc. |
74
- | `public/` | Static files like CSS, JSON, images |
75
-
76
- ---
77
-
78
- ## 🛠 Define Config
79
-
80
- Create a `config.ts` file at the root of your project:
81
-
82
- ```ts
83
- import defineConfig from "vaderjs/config";
84
-
85
- export default defineConfig({
86
- port: 3000,
87
- host: "localhost",
88
- hot_reload: true,
89
- });
90
- ```
91
-
92
-
93
- ## 🤔 Why Vader.js?
94
-
95
- * Minimal reactivity model with zero VDOM
96
- * File-based routing system built into Bun
97
- * Tiny runtime, blazing fast updates
98
- * Familiar API inspired by React, but simpler
99
- * Perfect for Bun-first, fullstack apps