Skip to content

Commit

Permalink
Added: Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanSharma100 committed Feb 9, 2024
1 parent 8f3c81b commit 42bf70c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# Ignoring Build folder
build

README.md

# Logs
logs
*.log
Expand Down
28 changes: 18 additions & 10 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vyuha (व्यूह)

A Node.js Template Engine inspired by EJS and Angular.
A Node.js Template Engine inspired by EJS, Angular and Laravel Blade.

## Installation

Expand Down Expand Up @@ -36,7 +36,7 @@ pnpm add vyuha

## Supported Control Flow

- Extend Layouts with `@extend`
- Extend Layouts with `@extends`
- Create Blocks with `@block`
- Start with `@<controlName>` and end with `@end<controlName>`
- More to come, stay tuned!
Expand Down Expand Up @@ -135,9 +135,13 @@ app.listen(3000, () => {

```html
<!-- index.vyuha -->
@extend('layout') @block('title')
@extends "layout"

@block title
<h1>{{ title }}</h1>
@endblock @block('content')
@endblock

@block content
<p>{{ description }}</p>
@endblock
```
Expand All @@ -160,23 +164,26 @@ app.listen(3000, () => {
<li><a href="/about">About</a></li>
</ul>
</nav>
@block('content')
@block content
@endblock
</body>
```

### Pipes

```html
```vyuha
<!-- index.vyuha -->
@extend('layout') @block('title')
@extend "layout"
@block title
<h1>{{ title }}</h1>
@endblock @block('content')
@endblock
@block content
<h1>{{ title | uppercase }}</h1>
<!-- HELLO, WORLD! -->
<p>{{ description | lowercase }}</p>
<!-- this is a simple example of vyuha. -->

@endblock
```

Expand Down Expand Up @@ -240,10 +247,11 @@ MIT

Contributions are welcome! Feel free to open an issue or a pull request.

## Acknowledgements
## Inspiration

- [EJS](https://ejs.co/)
- [Angular](https://angular.io/)
- [Laravel Blade](https://laravel.com/docs/10.x/blade)

## Support

Expand Down

0 comments on commit 42bf70c

Please sign in to comment.