mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-09 11:16:39 -05:00
Update the blade-extensions config
This commit is contained in:
parent
c14a5912e2
commit
8cacedf5f7
2 changed files with 66 additions and 82 deletions
66
config/blade-extensions.php
Normal file
66
config/blade-extensions.php
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/**
|
||||
* Copyright (c) 2017. Robin Radic.
|
||||
*
|
||||
* The license can be found in the package and online at https://radic.mit-license.org.
|
||||
*
|
||||
* @copyright 2017 Robin Radic
|
||||
* @license https://radic.mit-license.org MIT License
|
||||
* @version 7.0.0 Radic\BladeExtensions
|
||||
*/
|
||||
|
||||
return [
|
||||
'directives' => [
|
||||
'set' => 'Radic\\BladeExtensions\\Directives\\SetDirective',
|
||||
'unset' => 'Radic\\BladeExtensions\\Directives\\UnsetDirective',
|
||||
|
||||
'breakpoint' => 'Radic\\BladeExtensions\\Directives\\BreakpointDirective',
|
||||
'dump' => 'Radic\\BladeExtensions\\Directives\\DumpDirective',
|
||||
|
||||
'foreach' => 'Radic\\BladeExtensions\\Directives\\ForeachDirective',
|
||||
'endforeach' => 'Radic\\BladeExtensions\\Directives\\EndforeachDirective',
|
||||
'break' => 'Radic\\BladeExtensions\\Directives\\BreakDirective',
|
||||
'continue' => 'Radic\\BladeExtensions\\Directives\\ContinueDirective',
|
||||
|
||||
'embed' => 'Radic\\BladeExtensions\\Directives\\EmbedDirective'
|
||||
|
||||
// 'closure' => function ($value) {
|
||||
// return $value;
|
||||
// },
|
||||
|
||||
],
|
||||
// `optional` directives are only used for **unit-testing**
|
||||
// If you want to use any of the `optional` directives, you have to **manually copy/paste** them to `directives`.
|
||||
'optional' => [
|
||||
'macro' => 'Radic\\BladeExtensions\\Directives\\MacroDirective',
|
||||
'endmacro' => 'Radic\\BladeExtensions\\Directives\\EndmacroDirective',
|
||||
'macrodef' => 'Radic\\BladeExtensions\\Directives\\MacrodefDirective',
|
||||
|
||||
'markdown' => 'Radic\\BladeExtensions\\Directives\\MarkdownDirective',
|
||||
'endmarkdown' => 'Radic\\BladeExtensions\\Directives\\EndmarkdownDirective',
|
||||
|
||||
'minify' => 'Radic\\BladeExtensions\\Directives\\MinifyDirective',
|
||||
'endminify' => 'Radic\\BladeExtensions\\Directives\\EndminifyDirective',
|
||||
|
||||
'spaceless' => 'Radic\\BladeExtensions\\Directives\\SpacelessDirective',
|
||||
'endspaceless' => 'Radic\\BladeExtensions\\Directives\\EndspacelessDirective',
|
||||
|
||||
'ifsection' => 'Radic\\BladeExtensions\\Directives\\IfSectionDirective',
|
||||
'elseifsection' => 'Radic\\BladeExtensions\\Directives\\ElseIfSectionDirective',
|
||||
'endifsection' => 'Radic\\BladeExtensions\\Directives\\EndIfSectionDirective',
|
||||
],
|
||||
'version_overrides' => [
|
||||
|
||||
// 5.2 introduced @break and @continue
|
||||
// but blade-extensions's @foreach relies on them so we don't yet disable them
|
||||
// 5.3 introduced the loop variable for the @foreach directive. we can disable these.
|
||||
// NOTE: If you have used blade-extensions's @foreach before blade-extensions:7.0.0, you probably want to remove this
|
||||
// TL:DR: upgrading to blade-extension 7.0.0? then remove this
|
||||
'>=5.3' => [
|
||||
'break' => null,
|
||||
'continue' => null,
|
||||
'foreach' => null,
|
||||
'endforeach' => null,
|
||||
],
|
||||
],
|
||||
];
|
|
@ -1,82 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Part of Radic - Blade Extensions
|
||||
*
|
||||
* @author Robin Radic
|
||||
* @license MIT License - http://radic.mit-license.org
|
||||
* @copyright (c) 2011-2015, Robin Radic - Radic Technologies
|
||||
* @link http://radic.nl
|
||||
*/
|
||||
|
||||
return array(
|
||||
/*
|
||||
|---------------------------------------------------------------------
|
||||
| Blacklisting of directives
|
||||
|---------------------------------------------------------------------
|
||||
|
|
||||
| These directives will be excluded.
|
||||
|
|
||||
*/
|
||||
'blacklist' => array(),
|
||||
/*
|
||||
|---------------------------------------------------------------------
|
||||
| Markdown options
|
||||
|---------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'markdown' => array(
|
||||
/*
|
||||
|---------------------------------------------------------------------
|
||||
| Enable markdown directives
|
||||
|---------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
'enabled' => true,
|
||||
/*
|
||||
|---------------------------------------------------------------------
|
||||
| Markdown renderer class
|
||||
|---------------------------------------------------------------------
|
||||
|
|
||||
| Class that renders markdown. Needs to implement Radic\BladeExtensions\Contracts\MarkdownRenderer
|
||||
|
|
||||
*/
|
||||
'renderer' => 'Radic\BladeExtensions\Renderers\ParsedownRenderer',
|
||||
/*
|
||||
|---------------------------------------------------------------------
|
||||
| Enable view compiler
|
||||
|---------------------------------------------------------------------
|
||||
|
|
||||
| Enables markdown view compiler.
|
||||
| This will enable you to use View::make('my_markdown_file') on `my_markdown_file.md`.
|
||||
| Or use @include('my_markdown_file')
|
||||
|
|
||||
*/
|
||||
'views' => true
|
||||
),
|
||||
/*
|
||||
|---------------------------------------------------------------------
|
||||
| Directives overrides
|
||||
|---------------------------------------------------------------------
|
||||
|
|
||||
| You can override any blade-extensions directive.
|
||||
| For reference see the directives.php file in the blade-extensions/src views
|
||||
*/
|
||||
'overrides' => array(/*
|
||||
'macro' => array(
|
||||
'pattern' => '/(?<!\\w)(\\s*)@macro(?:\\s*)\\((?:\\s*)[\'"]([\\w\\d]*)[\'"],(.*)\\)/',
|
||||
'replacement' => '$1<?php if(array_key_exists("form", $__env->getContainer()->getBindings())){ echo app("form")->$2($3); } ?>'
|
||||
)
|
||||
*/
|
||||
),
|
||||
/*
|
||||
|---------------------------------------------------------------------
|
||||
| Enable example views
|
||||
|---------------------------------------------------------------------
|
||||
|
|
||||
| If enabled, several example views including layout, views and embed partials
|
||||
| will be available under the blade-ext::<view> namespace. Use vendor:publish --tag=view
|
||||
| to publish to your own resources folder. Based on bootstrap 3.3
|
||||
*/
|
||||
'example_views' => env('BLADE_EXTENSIONS_EXAMPLE_VIEWS', false)
|
||||
|
||||
);
|
Loading…
Reference in a new issue