Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shakyshane/js-blade

Javascript port of Laravel's Blade Templating language for Node
https://github.com/shakyshane/js-blade

Last synced: about 2 months ago
JSON representation

Javascript port of Laravel's Blade Templating language for Node

Awesome Lists containing this project

README

        

##JS Blade [![Build Status](https://travis-ci.org/shakyShane/js-blade.svg?branch=master)](https://travis-ci.org/shakyShane/js-blade)

> Javascript port of Laravel's Blade Templating language for NodeJS

###TODO - tags

- [x] `@section`
- [x] `@yield`
- [ ] `@extends`
- [ ] `@include`

##`@section` & `@yield`
One thing that has always driven me CRAZY about all templating
languages is that they always assume that the formatting of output
is irrelevant - and it mostly is.

But sometimes it's incredibly important (source code snippet, for example) - so I've decided that right from the word go, I'd fix this in js-blade.

Given this input

```html
@section("shane")

Saving sections is a cool feature
Especially if indentation is respected


@stop

Yields are cool!


@yield("shane")

```

In Laravel's Blade, you'd get this:

```html

Yields are cool!


Saving sections is a cool feature
Especially if indentation is respected

```

But in Blade JS, you'll get exactly what you wanted

```html

Yields are cool!


Saving sections is a cool feature
Especially if indentation is respected

```