1.0.2 • Published 7 years ago

laravel-mix-blade-jade v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

laravel-mix-blade-jade

Create laravel blade views using jade

Install

$ npm install --save-dev laravel-mix-blade-jade
// webpack.mix.js

let mix = require('laravel-mix');

mix.setPublicPath('dist');
mix.jade = require('laravel-mix-blade-jade');

/**
 * Blade Views
 */
mix.jade('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

License

MIT @ JMJ

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago