Download the PHP package jumilla/erb2blade without Composer
On this page you can find all versions of the php package jumilla/erb2blade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package erb2blade
erb2blade
機能
- RailsのテキストテンプレートErbファイル(.*.erb)を、Laravel4のビューテンプレートBladeファイル(.blade.php)に変換します。
- Artisanコマンド
view:erb2bladeで変換できます。
対応erbディレクティブ
<%# ... %>=>{{-- --}}<%= render ... %>=>@include (...)<%= ... %>=>{{ }}<% if statement %>=>@if (statement)<% unless statement %>=>@if (!(statement))<% while statement do %>=>@while (statement)<% statement.each do |value| %>=>@foreach (statement as $value)<% statement.each_with_index do |value, key| %>=>@foreach (statement as $key => $value)<% case statement %>=> ``<% when statement %>=> ``<% else %>=>@else<% elsif %>=>@elseif<% end %>=>@end?<% ... %>=> ``
インストール方法
composer.jsonファイルを編集します。
行末のカンマはJSON記法に合わせて設定してください。
Laravel 5
Laravel 4
以下のコマンドを実行して、Laravel Extension Packをセットアップしてください。
app/config/app.configファイルを編集します。
コマンド
php artisan view:erb2blade
app/viewsディレクトリ下にある全ての.*.erbファイルを、.blade.phpファイルに変換します。
注意
- <% %>ディレクティブの中の変数までは見ていません。
$を付けるなどして手動で変換してください。 - Rubyの
endキーワードは、if,unless,case,while,until,forの制御構文の終端シンボルです。@end?に変換するので手動で変換してください。 - Rubyのcase/when/endブロックの変換は不完全です。
@end?の部分を ``に置き換えてください。
ライセンス
MIT
著者
Fumio Furukawa ([email protected])
All versions of erb2blade with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5.9
symfony/finder Version 2.7.*
illuminate/config Version 5.0.*
illuminate/console Version 5.0.*
illuminate/container Version 5.0.*
illuminate/contracts Version 5.0.*
illuminate/support Version 5.0.*
symfony/finder Version 2.7.*
illuminate/config Version 5.0.*
illuminate/console Version 5.0.*
illuminate/container Version 5.0.*
illuminate/contracts Version 5.0.*
illuminate/support Version 5.0.*
The package jumilla/erb2blade contains the following files
Loading the files please wait ...