Skip to content

Commit

Permalink
Add support for the component and slot directives
Browse files Browse the repository at this point in the history
  • Loading branch information
melvinbeemer committed Feb 25, 2021
1 parent 79578a9 commit 0f245d0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 0.7

- Added support for the @component and @slot directives

## Version 0.6

- Added support for the @dd and @parent directives
Expand Down
4 changes: 4 additions & 0 deletions Completions/Blade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
<completion string="@endstory" />
<completion string="@endtask" />
<completion string="@parent" />
<completion string="@endcomponent" />
<completion string="@endslot" />
</set>

<set name="blade.keywords.parameters" symbol="method">
Expand Down Expand Up @@ -97,5 +99,7 @@
<completion string="@story" />
<completion string="@task" />
<completion string="@dd" />
<completion string="@component" />
<completion string="@slot" />
</set>
</completions>
4 changes: 4 additions & 0 deletions Syntaxes/Blade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@
<string>endstory</string>
<string>endtask</string>
<string>parent</string>
<string>endcomponent</string>
<string>endslot</string>
</strings>
</scope>

Expand Down Expand Up @@ -231,6 +233,8 @@
<string>story</string>
<string>task</string>
<string>dd</string>
<string>component</string>
<string>slot</string>
</strings>
</starts-with>
<ends-with>
Expand Down
3 changes: 3 additions & 0 deletions Tests/test.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
@auth($test)
<article>
<h1><a href="{{ route('articles.show', ['id' => $article->id]) }}">{{ $article->title }}</a></h1>
@component('alert', ['foo' => 'bar'])
<x-article-footer article="$article"></x-article-footer>
@endcomponent
</article>
@empty
<div>No articles.</div>
Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Blade",
"organization": "Melvin Beemer",
"description": "Syntax highlighting and completion for Laravel Blade",
"version": "0.6",
"version": "0.7",
"license": "MIT",
"bugs": "https://github.com/melvinbeemer/Blade.novaextension/issues",
"repository": "https://github.com/melvinbeemer/Blade.novaextension",
Expand Down

0 comments on commit 0f245d0

Please sign in to comment.