1.0.5 • Published 6 years ago

laravel-mix-blade-pug v1.0.5

Weekly downloads
15
License
MIT
Repository
github
Last release
6 years ago

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

License

MIT @ JMJ

1.0.5

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago