Basic Implement

This commit is contained in:
Darron Park 2018-03-19 14:57:00 +09:00
parent 926bcd4970
commit 895d0178cb
6 changed files with 98 additions and 1 deletions

View File

@ -0,0 +1,32 @@
<html>
<head>
<title>App Name - @yield('title')</title>
</head>
<body>
@section('sidebar') This is the {{ $mater }} sidebar.
@show
<div class="container">
@yield('content')
</div>
@component('alert')
@slot('title') Forbidden
@endslot
<strong>Whoops!</strong> Something went wrong!
@endcomponent
@foreach ($users as $user)
@if ($user->type == 1)
@continue
@endif
<li>{{ $user->name }}</li>
@if ($user->number == 5)
@break
@endif
@endforeach
</body>
</html>

View File

@ -0,0 +1,31 @@
<html>
<head>
<title>App Name - @yield('title')</title>
</head>
<body>
@section('sidebar')
This is the {{ $mater }} sidebar.
@show
<div class="container">
@yield('content')
</div>
@component('alert')
@slot('title')
Forbidden
@endslot
<strong>Whoops!</strong> Something went wrong!
@endcomponent
@foreach ($users as $user)
@if ($user->type == 1)
@continue
@endif
<li>{{ $user->name }}</li>
@if ($user->number == 5)
@break
@endif
@endforeach
</body>
</html>

View File

@ -44,7 +44,7 @@ describe "BeautifyLanguages", ->
# Activate all of the languages
allLanguages = [
"c", "clojure", "coffee-script", "css", "csharp", "d",
"blade", "c", "clojure", "coffee-script", "css", "csharp", "d",
"gfm", "go", "html", "html-swig", "java", "javascript",
"json", "less", "lua", "marko", "mustache", "objective-c",
"perl", "php", "python", "ruby", "sass", "sql",

View File

@ -6,6 +6,7 @@ module.exports = class JSBeautify extends Beautifier
link: "https://github.com/beautify-web/js-beautify"
options: {
Blade: true
HTML: true
XML: true
Handlebars: true
@ -51,6 +52,16 @@ module.exports = class JSBeautify extends Beautifier
beautifyCSS = require("js-beautify").css
text = beautifyCSS(text, options)
resolve text
when "Blade"
beautifyHTML = require("js-beautify").html
# pre script (Workaround)
text = text.replace(/\@(?!yield)([^\n\s]*)/ig, "<blade $1 />")
text = beautifyHTML(text, options)
# post script (Workaround)
text = text.replace(/<blade ([^\n]*)\/>/ig, "@$1")
text = text.replace(/\(\ \'/ig, "('")
@debug("Beautified HTML: #{text}")
resolve text
else
reject(new Error("Unknown language for JS Beautify: "+language))
catch err

View File

@ -0,0 +1,22 @@
module.exports = {
name: "Blade"
namespace: "blade"
fallback: ["html", "php"]
###
Supported Grammars
###
grammars: [
"Blade"
]
###
Supported extensions
###
extensions: [
"blade.php"
]
options: []
}

View File

@ -15,6 +15,7 @@ module.exports = class Languages
"apex"
"arduino"
"bash"
"blade"
"c-sharp"
"c"
"clojure"