1.0.10 • Published 7 years ago

laravel-blade-compiler v1.0.10

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

Laravel Blade Parser

Build Status NPM Downloads NPM Version NPM License

This package compile laravel blade templates to HTML.

Installation

Via Yarn:

$ yarn add laravel-blade-compiler

or via NPM:

$ npm install laravel-blade-compiler

Usage

Require the package like so:

var laravelBladeCompiler = require('laravel-blade-compiler');

Then you can use the package like so:

var compiledHTML = laravelBladeCompiler({
    folder: 'path/to/views/folder',
    path: 'path/to/template.blade.php'
});

Options

NameTypeDefault valueDescription
extendsbooleantrueEnable/disable compiling @extends directives
folderstring./resources/viewsPath to the views directory.
encodingstringutf8Blade templates encoding
pathstring./resources/views/welcome.blade.phpPath to the compiled blade template file