rsf-zero 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +8 -1
  2. package/README.md +0 -56
package/package.json CHANGED
@@ -1,7 +1,14 @@
1
1
  {
2
2
  "name": "rsf-zero",
3
+ "description": "A minimal micro-framework with React Server Functions support",
4
+ "author": "Igor Nadj",
3
5
  "type": "module",
4
- "version": "0.1.0",
6
+ "version": "0.1.1",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/IgorNadj/rsf-zero.git",
10
+ "directory": "rsf-zero"
11
+ },
5
12
  "scripts": {
6
13
  "build": "rm -rf ./dist && tsc",
7
14
  "test": "vitest run",
package/README.md DELETED
@@ -1,56 +0,0 @@
1
- # rsf-zero
2
-
3
- ## Setup
4
-
5
- Add these scripts to your **package.json**:
6
-
7
- ```
8
- ...
9
- "scripts": {
10
- "dev": "rsf-zero dev",
11
- "build": "rsf-zero build",
12
- "start": "rsf-zero start",
13
- },
14
- ...
15
- ```
16
-
17
- Then create an **index.html**:
18
- ```html
19
- <!doctype html>
20
- <html lang="en">
21
- <head>
22
- <meta charset="UTF-8" />
23
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
24
- <title>RSF-Zero example</title>
25
- </head>
26
- <body>
27
- <div id="root"></div>
28
- <script type="module" src="/src/main.tsx"></script>
29
- </body>
30
- </html>
31
- ```
32
-
33
- And finally create a **src/main.tsx** file:
34
- ```tsx
35
- import { StrictMode } from "react";
36
- import { createRoot } from "react-dom/client";
37
-
38
- createRoot(document.getElementById("root")!).render(
39
- <StrictMode>
40
- RSF Zero up and running!
41
- </StrictMode>,
42
- );
43
- ```
44
-
45
-
46
- ## Advanced topics
47
-
48
- ### Server function arguments
49
-
50
- Server function calls are serialised and deserialised between client and server. Server function argument types must be serialisable.
51
-
52
- **RSF Zero** uses [superjson](https://github.com/flightcontrolhq/superjson) under the hood, and the most common types are supported.
53
- See the [superjson docs](https://github.com/flightcontrolhq/superjson?tab=readme-ov-file#parse) for more info.
54
-
55
- ### Verbose logging
56
- Prefix commands with `NODE_DEBUG=rsf-zero` to see debug logs, for example: `NODE_DEBUG=rsf-zero yarn build`.