Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iguntur/laravel-blade-jade
Create laravel blade views using jade
https://github.com/iguntur/laravel-blade-jade
Last synced: 25 days ago
JSON representation
Create laravel blade views using jade
- Host: GitHub
- URL: https://github.com/iguntur/laravel-blade-jade
- Owner: iguntur
- License: mit
- Created: 2016-08-12T23:45:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-18T16:26:45.000Z (about 8 years ago)
- Last Synced: 2024-10-09T11:48:12.679Z (30 days ago)
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-blade-jade
> Create laravel blade views using jade
## Install
``` bash
$ npm install --save-dev laravel-blade-jade
`````` js
// Gulpfile.jsconst elixir = require('laravel-elixir');
require('laravel-blade-jade');
elixir(mix => {
/**
* Blade Views
*/
mix.blade({
sourcePath: "resources/assets/blade",
locals: {}
});// ...
});
```## Usage
Trigger
``` bash
$ gulp blade
`````` js
// index.jadedoctype html
html
head
title @yield('title')
body
@include("partials.foo-bar", ['key' => 'val'])@section('sidebar')
sidebar.master
p This is the master sidebar.
@stop.container: .row
@yield('content')
`````` html
@yield('title')
@include("partials.foo-bar", ['key' => 'val'])
@section('sidebar')
This is the master sidebar.
@stop
@yield('content')
```
**Files containing `_*.jade` not be rendered.**
## API
### mix.blade(options)
#### options
Type: `object`
All options supported by the [Jade API](http://jade-lang.com/api/) are supported
##### sourcePath
Type: `string`, `null`
Default: `"resources/assets/blade"`##### outputPath
Type: `string`, `null`
Default: `"resources/views"`##### basedir
Type: `string`, `null`
Default: `null`##### locals
Type: `object`
Default: `{}`##### pretty
Type: `boolean`, `string`
Default: `true`## Official Documentations
- Documentation for Elixir can be found on the [Laravel website](http://laravel.com/docs/elixir).
- Documentation for Jade can be found on the [Jade website](http://jade-lang.com).
- Documentation for Elixir repositories can be found on the [Github](https://github.com/laravel/elixir)### Notes
If you using `version 1.0` please check [docs](https://github.com/iGuntur/laravel-blade-jade/blob/1.0/readme.md#basic-usage)
## Related
- [bladejs-core](https://github.com/iguntur/bladejs-core) - API for this module
## License
MIT @ [Guntur Poetra](http://guntur.starmediateknik.com)