Socket
Book a DemoInstallSign in
Socket

laravel-blade-jade

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laravel-blade-jade

Create laravel blade views using jade

latest
Source
npmnpm
Version
2.0.3
Version published
Maintainers
1
Created
Source

laravel-blade-jade

Create laravel blade views using jade

Install

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

const elixir = require('laravel-elixir');

require('laravel-blade-jade');

elixir(mix => {

    /**
     * Blade Views
     */
    mix.blade({
        sourcePath: "resources/assets/blade",
        locals: {}
    });

    // ...
});

Usage

Trigger

$ gulp blade
// 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>

Files containing _*.jade not be rendered.

API

mix.blade(options)

options

Type: object

All options supported by the Jade 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.
  • Documentation for Jade can be found on the Jade website.
  • Documentation for Elixir repositories can be found on the Github

Notes

If you using version 1.0 please check docs

License

MIT @ Guntur Poetra

Keywords

laravel

FAQs

Package last updated on 18 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts