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

https://github.com/postor/gulp-jade-for-php

针对php语言的jade模板实现,利用gulp进行前端自动化| a gulp plugin for jade template adapt for php
https://github.com/postor/gulp-jade-for-php

Last synced: 3 months ago
JSON representation

针对php语言的jade模板实现,利用gulp进行前端自动化| a gulp plugin for jade template adapt for php

Awesome Lists containing this project

README

        

# gulp-jade-for-php #

Compiles jade-php templates using gulp.

For gulp-jade-php does not support parsing attributes,so i wrote this.

This module is based on the well written jadegulp.

usage:

npm install gulp-jade-for-php

var phpJade = require('gulp-jade-for-php');
gulp.task('jade-php', function() {
gulp.src('../**/*.jade')
.pipe(phpJade())
.pipe(gulp.dest('../'));
});

针对php语言的jade模板实现,利用gulp进行前端自动化.

因为 gulp-jade-php 不支持动态的属性写法,所以是这么实现的.

这个模块依赖jadegulp.

## Documentation

### Modified syntax
The following syntax sample is formatted as if pretty print option is set.

#### attribute as php expression with escape.

```
tag(attr=php_function())
```

```html

```

#### attribute as php expression without escape.

```
tag(attr!=php_function())
```

```html

```

#### attribute as php expression without echo.

```
tag(attr!=-php_function())
```

```

```

#### nameless attribute

```
tag(__=php_function())
```

```html
>
```
_____________

```
tag(__=php_function(), ___=php_function2())
```

```html
>
```

#### codes
```
tag
- php_code
```

```html

```

#### php filter

```
:php
/* some php codes comes here */
call_php_function();
html
```

```

```

## Examples
```
html
body
- testfunc();
div(__=some_php_function())
| test
- foreach ($this->list as $list):
li!= $list
- endforeach

```

```html



>test

list as $list): ?>


  • ```