Skip to content

Commit b332576

Browse files
committed
added badge
1 parent fe591c5 commit b332576

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<a href="https://www.npmjs.com/package/modular-openscriptjs"><img src="https://img.shields.io/npm/v/modular-openscriptjs.svg?style=flat-square" alt="NPM Version"></a>
1616
<a href="https://github.com/OpenScriptJs/modular-openscript/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/modular-openscriptjs.svg?style=flat-square" alt="License"></a>
1717
<a href="https://github.com/OpenScriptJs/modular-openscript/issues"><img src="https://img.shields.io/github/issues/OpenScriptJs/modular-openscript?style=flat-square" alt="Issues"></a>
18+
<a href="https://www.npmjs.com/package/modular-openscriptjs"><img src="https://img.shields.io/npm/dt/modular-openscriptjs.svg?style=flat-square" alt="Downloads"></a>
1819
</p>
1920

2021
## Introduction
@@ -71,11 +72,13 @@ We didn't just build another framework; we built a toolset for developers who va
7172
### Installation
7273

7374
Start a project (All basic configurations are done)
75+
7476
```bash
7577
npm create openscript-app <project-name> <template>
7678
```
7779

7880
Available templates:
81+
7982
- `basic`
8083
- `tailwind`
8184
- `bootstrap`
@@ -448,11 +451,11 @@ You are now set up with the basic structure of an OpenScript application!
448451

449452
OpenScript is built around an **Inversion of Control (IoC) Container**. Instead of importing global instances directly, you access core services via the `app()` helper.
450453

451-
| Service | Access | Description |
452-
| :---------------- | :----------------------- | :--------------------------------------------- |
453-
| **Markup Engine** | `app('h')` | Helper proxy for creating DOM elements. |
454-
| **Router** | `app('router')` | Manages navigation and URL handling. |
455-
| **Broker** | `app('broker')` | Central event bus for decoupled communication. |
454+
| Service | Access | Description |
455+
| :---------------- | :-------------- | :--------------------------------------------- |
456+
| **Markup Engine** | `app('h')` | Helper proxy for creating DOM elements. |
457+
| **Router** | `app('router')` | Manages navigation and URL handling. |
458+
| **Broker** | `app('broker')` | Central event bus for decoupled communication. |
456459

457460
---
458461

@@ -859,19 +862,19 @@ h.div(
859862
v(user, (u) => `Hello, ${u.name}!`),
860863
);
861864
```
865+
862866
To style the anonymous component wrapper, you can add a third argument to the `v` helper. The third parameter should be an object like `{ c_attr: {class: 'mb-3 d-block'} }`
867+
863868
```javascript
864869
import { v, app } from "modular-openscriptjs";
865870
const h = app("h");
866871

867872
h.div(
868873
h.h1("Welcome"),
869874
// Only this specific span node updates when 'user' state changes
870-
v(
871-
user,
872-
(u) => h.span(`Hello, ${u.value.name}!`),
873-
{ c_attr: {class: 'mb-3 d-block'} }
874-
),
875+
v(user, (u) => h.span(`Hello, ${u.value.name}!`), {
876+
c_attr: { class: "mb-3 d-block" },
877+
}),
875878
);
876879
```
877880

0 commit comments

Comments
 (0)