You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight, reactive JavaScript framework for building modern web applications with components, state management, routing, and event-driven architecture.
@@ -20,52 +20,45 @@ A lightweight, reactive JavaScript framework for building modern web application
20
20
21
21
### Installation
22
22
23
-
```bash
24
-
npm install openscriptjs
25
-
```
26
-
27
-
### Create a New Project
28
-
29
-
```bash
30
-
npm create openscript my-app
31
-
cd my-app
32
-
npm run dev
33
-
```
34
-
35
-
Choose from templates:
23
+
````bash
36
24
- `basic` - Clean starter with vanilla CSS
37
25
- `tailwind` - Pre-configured with TailwindCSS
38
26
39
27
## 📖 Basic Usage
40
28
41
29
```javascript
42
-
import { Component, h, state } from'openscriptjs';
30
+
import { Component, app, state } from "modular-openscriptjs";
31
+
32
+
const h = app("h");
43
33
44
34
class Counter extends Component {
45
-
constructor() {
46
-
super();
47
-
this.count=state(0);
48
-
}
49
-
50
-
increment() {
51
-
this.count.value++;
52
-
}
53
-
54
-
render() {
55
-
returnh.div(
56
-
h.h2("Count: ", this.count.value),
57
-
h.button({
58
-
listeners: { click:this.increment.bind(this) }
59
-
}, "Increment")
60
-
);
61
-
}
35
+
constructor() {
36
+
super();
37
+
this.count = state(0);
38
+
}
39
+
40
+
increment() {
41
+
this.count.value++;
42
+
}
43
+
44
+
render() {
45
+
return h.div(
46
+
h.h2("Count: ", this.count.value),
47
+
h.button(
48
+
{
49
+
listeners: { click: this.increment.bind(this) },
50
+
},
51
+
"Increment"
52
+
)
53
+
);
54
+
}
62
55
}
63
56
64
57
// Mount and render
65
58
const counter = new Counter();
66
59
await counter.mount();
67
60
h.Counter({ parent: document.body });
68
-
```
61
+
````
69
62
70
63
## 🏗️ Project Structure
71
64
@@ -85,23 +78,21 @@ my-app/
85
78
### Components
86
79
87
80
```javascript
88
-
import { Component, h } from'openscriptjs';
81
+
import { Component, app } from "modular-openscriptjs";
0 commit comments