From c601b7caff0da5da7430554d77df1203f161692a Mon Sep 17 00:00:00 2001 From: "Matthew R. Miller" Date: Tue, 12 Jul 2016 10:17:09 -0600 Subject: [PATCH 01/10] Changing copyright to reflect repository ownership change. --- src/ClassyGeeks/Potion/BladeHelpers.php | 2 +- src/ClassyGeeks/Potion/Console/Command/ClearAssetsCommand.php | 2 +- src/ClassyGeeks/Potion/Console/Command/MakeAssetsCommand.php | 2 +- src/ClassyGeeks/Potion/PotionServiceProvider.php | 2 +- src/config/config.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ClassyGeeks/Potion/BladeHelpers.php b/src/ClassyGeeks/Potion/BladeHelpers.php index f6fadfe..81fc49d 100644 --- a/src/ClassyGeeks/Potion/BladeHelpers.php +++ b/src/ClassyGeeks/Potion/BladeHelpers.php @@ -1,6 +1,6 @@ Date: Tue, 27 Jun 2017 15:58:44 -0600 Subject: [PATCH 02/10] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 02deef3..771ebf2 100644 --- a/README.md +++ b/README.md @@ -53,4 +53,8 @@ You will now see to new Potion artisan commands. The configuration is very well - Resource watching command functionality - Support for more filters from Assetic +# License +[MIT License](LICENSE) +# Author +[Matthew R. Miller](https://github.com/mattrmiller) From 33d7f342257eaf195fee3346ff1f2f408e46f61c Mon Sep 17 00:00:00 2001 From: "Matthew R. Miller" Date: Tue, 27 Jun 2017 15:59:43 -0600 Subject: [PATCH 03/10] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 771ebf2..d841c53 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -laravel-potion -=============== +# laravel-potion + Potion is a pure PHP asset manager for Laravel based off of [Assetic](https://github.com/kriswallsmith/assetic). -###Description +# Description Laravel 5 comes with a great asset manager called Elixir. While there is nothing wrong with Elixir, it requires you to install Node.js, Gulp, and dependent NPM packages on all of your web serves. While there is nothing wrong with this if you have other needs for those technologies, it seemed unnecessary to us to install that stack solely for the sake of handling assets. So we wrote Potion. Potion is a pure PHP solution, based off of [Assetic](https://github.com/kriswallsmith/assetic) that allows you to handle your assets in the same technology stack that your application is written in. When using Potion the you will often see is "resources" and "assets". Think of resources as the raw resources inside of Laravel resources direction. Think of assets as what Potion will generate and will ultimately be served to visitors. -###Laravel Support +# Laravel Support At this time Potion only supports Laravel 5.1 or higher. While Laravel 4 support was easy to implement in code, the time needed to support requests was too much. -###Features +# Features - Fully integrated into Laravels' artisan commands - Asset versioning support - Asset CDN Url support @@ -29,7 +29,7 @@ At this time Potion only supports Laravel 5.1 or higher. While Laravel 4 support - JsCompressorFilter from YUI - ScssphpFilter -###Installation +# Installation 1) Add 'classygeeks/potion' package to your composer.json file: 2) Add the Potion Service provider to your config/app.php file under the predefined "providers" array: @@ -49,7 +49,7 @@ At this time Potion only supports Laravel 5.1 or higher. While Laravel 4 support You will now see to new Potion artisan commands. The configuration is very well documented and should be able to get even the most complex projects going quickly. -###Future Features +# Future Features - Resource watching command functionality - Support for more filters from Assetic From d9285a9d021aca7fbfa6fb8e864228580da2d35c Mon Sep 17 00:00:00 2001 From: "Matthew R. Miller" Date: Wed, 28 Jun 2017 08:04:42 -0600 Subject: [PATCH 04/10] Update README.md --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d841c53..2e0028f 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,16 @@ You will now see to new Potion artisan commands. The configuration is very well - Resource watching command functionality - Support for more filters from Assetic -# License -[MIT License](LICENSE) +# Rules For Contributing +- Please make sure all changed files are run through gofmt +- Submit a PR for review +- Your name will be added below to Contributors # Author [Matthew R. Miller](https://github.com/mattrmiller) + +# Contributors +[Matthew R. Miller](https://github.com/mattrmiller) + +# License +[MIT License](LICENSE) From 6d79ee4ac6d3584a9964c34c3fb701ba29d333ad Mon Sep 17 00:00:00 2001 From: Daniel Lowhorn Date: Thu, 31 Aug 2017 12:11:45 -0500 Subject: [PATCH 05/10] - Updated leafo/scssphp dependency --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0f1c58c..3e0e6e4 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "kriswallsmith/assetic": "1.*", "natxet/CssMin": "3.0.*", "leafo/lessphp": "0.5.*", - "leafo/scssphp": "0.1.*", + "leafo/scssphp": "0.6.*", "ptachoire/cssembed": "1.0.*", "linkorb/jsmin-php": "1.0.*" }, From 9cebe0aa350c9b012279621d1e5f75897bbdddde Mon Sep 17 00:00:00 2001 From: Daniel Lowhorn Date: Fri, 1 Sep 2017 07:15:03 -0500 Subject: [PATCH 06/10] - Modified order of parameters in assetCss to be consistent with other asset helpers - Added missing "?" versioning output --- src/ClassyGeeks/Potion/BladeHelpers.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ClassyGeeks/Potion/BladeHelpers.php b/src/ClassyGeeks/Potion/BladeHelpers.php index 81fc49d..ee77235 100644 --- a/src/ClassyGeeks/Potion/BladeHelpers.php +++ b/src/ClassyGeeks/Potion/BladeHelpers.php @@ -50,7 +50,7 @@ public static function assetUrl($name, $version = false) // Version? if ($version) { - $ret .= "v={$cache[$name]}"; + $ret .= "?v={$cache[$name]}"; } return $ret; @@ -59,11 +59,11 @@ public static function assetUrl($name, $version = false) /** * Asset Css * @param $name - * @param $rel * @param $version + * @param $rel * @return bool|string */ - public static function assetCss($name, $rel = 'stylesheet', $version = false) + public static function assetCss($name, $version = false, $rel = 'stylesheet') { // Get cache $cache = Cache::get('potion_assets', []); @@ -125,4 +125,4 @@ public static function assetImg($name, $version = false) // Return return ""; } -} \ No newline at end of file +} From f4b43ac130e39f6cd433e7d23f91c38e1b1e96c5 Mon Sep 17 00:00:00 2001 From: Daniel Lowhorn Date: Fri, 1 Sep 2017 07:24:19 -0500 Subject: [PATCH 07/10] - Extend assetJs with optional $defer parameter --- src/ClassyGeeks/Potion/BladeHelpers.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ClassyGeeks/Potion/BladeHelpers.php b/src/ClassyGeeks/Potion/BladeHelpers.php index ee77235..3bac78e 100644 --- a/src/ClassyGeeks/Potion/BladeHelpers.php +++ b/src/ClassyGeeks/Potion/BladeHelpers.php @@ -84,9 +84,10 @@ public static function assetCss($name, $version = false, $rel = 'stylesheet') * Asset Js * @param $name * @param $version + * @param $defer * @return bool|string */ - public static function assetJs($name, $version = false) + public static function assetJs($name, $version = false, $defer = FALSE) { // Get cache $cache = Cache::get('potion_assets', []); @@ -99,8 +100,11 @@ public static function assetJs($name, $version = false) // Url $url = self::assetUrl($name, $version); + // Deferred ? + $def = $defer ? 'defer' : ''; + // Return - return ""; + return ""; } /** From 3bd4d1e050d15c6eee48273337a627be3722c166 Mon Sep 17 00:00:00 2001 From: Daniel Lowhorn Date: Fri, 1 Sep 2017 07:30:01 -0500 Subject: [PATCH 08/10] - Fixed code formatting --- src/ClassyGeeks/Potion/BladeHelpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ClassyGeeks/Potion/BladeHelpers.php b/src/ClassyGeeks/Potion/BladeHelpers.php index 3bac78e..97d7fa2 100644 --- a/src/ClassyGeeks/Potion/BladeHelpers.php +++ b/src/ClassyGeeks/Potion/BladeHelpers.php @@ -100,8 +100,8 @@ public static function assetJs($name, $version = false, $defer = FALSE) // Url $url = self::assetUrl($name, $version); - // Deferred ? - $def = $defer ? 'defer' : ''; + // Deferred ? + $def = $defer ? 'defer' : ''; // Return return ""; From a2a1ff707848819ff7d24a25550b123081fa2d7e Mon Sep 17 00:00:00 2001 From: Daniel Lowhorn Date: Fri, 1 Sep 2017 08:08:46 -0500 Subject: [PATCH 09/10] - Added trailing newlines to markup returned from asset helpers --- src/ClassyGeeks/Potion/BladeHelpers.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ClassyGeeks/Potion/BladeHelpers.php b/src/ClassyGeeks/Potion/BladeHelpers.php index 97d7fa2..842f9b4 100644 --- a/src/ClassyGeeks/Potion/BladeHelpers.php +++ b/src/ClassyGeeks/Potion/BladeHelpers.php @@ -77,7 +77,7 @@ public static function assetCss($name, $version = false, $rel = 'stylesheet') $url = self::assetUrl($name, $version); // Return - return ""; + return "\n"; } /** @@ -104,7 +104,7 @@ public static function assetJs($name, $version = false, $defer = FALSE) $def = $defer ? 'defer' : ''; // Return - return ""; + return "\n"; } /** @@ -127,6 +127,6 @@ public static function assetImg($name, $version = false) $url = self::assetUrl($name, $version); // Return - return ""; + return "\n"; } } From a3339473cb25678f2a711f57574bae8887778e14 Mon Sep 17 00:00:00 2001 From: Daniel Lowhorn Date: Fri, 1 Sep 2017 08:29:15 -0500 Subject: [PATCH 10/10] - Fixed incorrect variable name --- src/ClassyGeeks/Potion/BladeHelpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ClassyGeeks/Potion/BladeHelpers.php b/src/ClassyGeeks/Potion/BladeHelpers.php index 842f9b4..c8554b6 100644 --- a/src/ClassyGeeks/Potion/BladeHelpers.php +++ b/src/ClassyGeeks/Potion/BladeHelpers.php @@ -101,7 +101,7 @@ public static function assetJs($name, $version = false, $defer = FALSE) $url = self::assetUrl($name, $version); // Deferred ? - $def = $defer ? 'defer' : ''; + $defer = $defer ? 'defer' : ''; // Return return "\n";