diff --git a/bladerunner.php b/bladerunner.php index 59b27c7..afe1719 100644 --- a/bladerunner.php +++ b/bladerunner.php @@ -3,7 +3,7 @@ Plugin Name: Bladerunner Plugin URI: https://github.com/ekandreas/bladerunner Description: Blade template engine for WordPress -Version: 0.5.7 +Version: 0.6 Author: Andreas Ek Author URI: http://www.aekab.se/ @@ -16,6 +16,9 @@ require_once __DIR__ . '/vendor/autoload.php'; } -require_once __DIR__ . '/src/model.php'; -require_once __DIR__ . '/src/controller.php'; +require_once __DIR__ . '/src/init.php'; +require_once __DIR__ . '/src/template.php'; require_once __DIR__ . '/src/blade.php'; + +new Bladerunner\Init(); +new Bladerunner\Template(); diff --git a/composer.json b/composer.json index 4aad5ef..8fab292 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "ekandreas/bladerunner", "type": "wordpress-plugin", - "version": "0.5.7", + "version": "0.6", "description": "WordPress Blade L5 template engine", "keywords": ["laravel", "blade", "wordpress"], "license": "MIT", diff --git a/composer.lock b/composer.lock index 7785cb9..68df08c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "f3dae1061e201d724a1c041d3e6228aa", - "content-hash": "fd0f7823dac812ae7b5774f670e6e9e3", + "hash": "31503a6f9df76e4388054c846319ee5b", + "content-hash": "27c2df359d8521ef2a4dce5e11fd41c9", "packages": [ { "name": "doctrine/inflector", diff --git a/readme.md b/readme.md index b4bfd69..c3978fa 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,6 @@ # Bladerunner WordPress plugin for Blade L5 templating -*** WORK IN PROGRESS *** - To install it to your Composer based WordPress installation: ``` @@ -26,6 +24,9 @@ Hello World Page rendered at {{ date('Y-m-d H:i:s') }} http://laravel.com/docs/master/blade +## Cache +* It's a really good idea to empty the .cache folder inside "uploads" when develop templates. Eg, create a "del" command inside your gulp-file. + ## Directories * Your cached views will always be stored in your wp upload folder, .cache. * Your views must be placed within your theme folder. diff --git a/src/controller.php b/src/controller.php deleted file mode 100644 index 5d6ed1b..0000000 --- a/src/controller.php +++ /dev/null @@ -1,40 +0,0 @@ -
Bladerunner cache error!
.cache -folder is missing in uploads. Please create the folder and make it writable!
"; - } - - static function not_writable() { - echo"Bladerunner writable error!
.cache -folder not writable. Please make the folder writable for your web process!
Cache folder missing
'; + echo 'Bladerunner needs a .cache -folder in uploads. Please create the folder and make it writable!
'; + echo 'Eg, mkdir ' . $this->cache . '
'; + echo 'Cache not writable
'; + echo 'Bladerunner cache folder .cache in uploads not writable. Please make the folder writable for your web server!
'; + echo 'Eg, chmod -R 777 ' . $this->cache . '
'; + echo '