laravel-mix-blade-pug
v1.0.5
Published
Make Laravel blade view template using laravel mix and pugjs.
Downloads
61
Readme
laravel-mix-blade-pug
Make Laravel Blade view template using Laravel Mix and Pugjs.
Install
$ npm install --save-dev laravel-mix-blade-pug
// webpack.mix.js
let mix = require('laravel-mix');
mix.setPublicPath('dist');
mix.pug = require('laravel-mix-blade-pug');
/**
* Blade Views
*/
mix.pug('src/views', 'public/views');
// ...
Usage
// index.jade
doctype 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')
<!-- index.blade.php -->
<!DOCTYPE html>
<html>
<head>
<title>@yield('title')</title>
</head>
<body>
@include("partials.foo-bar", ['key' => 'val'])
@section('sidebar')
<sidebar class="master">
<p>This is the master sidebar.</p>
</sidebar>
@stop
<div class="container">
<div class="row">
@yield('content')
</div>
</div>
</body>
</html>
Official Documentations
- Documentation for Mix can be found on the Laravel website.
- Documentation for Pug can be found on the Pug website.
- Documentation for Mix repositories can be found on the Github
Thanks
- bladejs-core - API for this src/core module
- laravel-mix-pug - API for this src/tasks module
- laravel-blade-jade - API for this README.md
License
MIT @ JMJ