vaderjs 1.3.3-alpha-5 → 1.3.3-alpha-7

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 (3) hide show
  1. package/README.md +16 -26
  2. package/package.json +1 -1
  3. package/vader.js +3 -2
package/README.md CHANGED
@@ -14,37 +14,24 @@
14
14
 
15
15
 
16
16
 
17
- ## Get Started
17
+ ## Get Started
18
18
 
19
- 1. Install Bun.js
19
+ 2. Install vaderjs
20
20
 
21
- Need more help? [Bun guide](https://bun.sh/docs/installation)
22
-
23
- ```sh
24
- curl -fsSL https://bun.sh/install | bash # for macOS, Linux, and WSL
21
+ ```bash
22
+ npm i vaderjs@latest
25
23
  ```
26
24
 
27
- > Skip if you are not using windows!
28
- [How to open folder in wsl](https://code.visualstudio.com/docs/remote/wsl)
29
-
30
- 1. Open a WSL terminal window (using the start menu item or by typing wsl from a command prompt / PowerShell).
31
-
32
- 2. Navigate to a folder you'd like to open in VS Code (including, but not limited to, Windows filesystem mounts like /mnt/c)
25
+ 3. Install five server - recommended to watch the index.html file as you edit your code
33
26
 
34
- 3. Type code . in the terminal. When doing this for the first time, you should see VS Code fetching components needed to run in WSL. This should only take a short while, and is only needed once.
27
+ [Vscode 5 Server](https://marketplace.visualstudio.com/items?itemName=yandeu.five-server)
35
28
 
36
- Open folder in vsc - open terminal and type wsl then type `code .` and continue to the next step
37
-
38
- 2. Installing vaderjs
39
-
40
- ```bash
41
- npm i vaderjs
42
- ```
43
-
44
- 3. Create Proper Folders
29
+ 4. Create Proper Folders
45
30
 
46
31
  Create a pages folder - which allows you to have nextjs page like routing via buns file based router
47
32
 
33
+ Tip: Each folder can be deep nested up to 4 levels!
34
+
48
35
  ```bash
49
36
  /pages/index.jsx = /
50
37
  /pages/home/[page].jsx = /home/:page
@@ -62,14 +49,13 @@ public - used for anything
62
49
 
63
50
 
64
51
 
65
- 4. And your done - Run `bun run vader --build` and the compiled output is visible inside of the `/dist/` folder!
52
+ 5. And your done - Run `npx vaderjs` and the compiled output is visible inside of the `/dist/` folder!
66
53
 
67
54
 
68
55
  ## Key Features & Examples
69
56
 
70
57
  ### File based routing
71
- vader's compiler automatically handles routing so you wont need to!
72
- below is valid paths for parsing per [Buns fileSystem Routing Api](https://bun.sh/docs/api/file-system-router)
58
+ vader's compiler automatically handles routing so you wont need to! - it uses a similar page routing to nextjs
73
59
 
74
60
  ```bash
75
61
  /pages/index.jsx = /
@@ -78,7 +64,7 @@ below is valid paths for parsing per [Buns fileSystem Routing Api](https://bun.s
78
64
 
79
65
 
80
66
  ```
81
- You can grab the request object from `this.request` and response object from `this.response!`
67
+ For pages that have [params] you can derive it using this.request
82
68
 
83
69
 
84
70
  ### Simplified Component Creation
@@ -145,6 +131,10 @@ Vaderjs allows you to bind functions directly to html elements just like react
145
131
  function click(event, otherparams){
146
132
  console.log(event.target, otherparams)
147
133
  }
134
+
135
+ const hello = function(event, otherparams){
136
+
137
+ }
148
138
 
149
139
  return <>
150
140
  <button onclick={()=>click()}>Click Me</button>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "vaderjs",
3
3
  "description": "A Reactive library aimed to helping you build reactive applications inspired by react.js",
4
4
  "module": "vader.js",
5
- "version": "1.3.3-alpha-5",
5
+ "version": "1.3.3-alpha-7",
6
6
  "bin": {
7
7
  "vader": "./vader.js"
8
8
  },
package/vader.js CHANGED
@@ -741,14 +741,15 @@ Building to ./dist
741
741
  break;
742
742
  default:
743
743
  console.log(`
744
- Vader.js is a reactive framework for building interactive applications for the web built ontop of bun.js!
744
+ Vader.js is a reactive framework for building interactive applications inspired by React.js and Next.js
745
745
 
746
746
  Usage: vader <command>
747
747
 
748
748
  Commands:
749
749
  --watch Watch the pages folder for changes and recompile
750
750
 
751
- --build Build the project
751
+ --build Build the project - use this to initialize the project
752
+
752
753
  Learn more about vader: https://vader-js.pages.dev/
753
754
 
754
755
  `)