diff --git a/README.md b/README.md
index 02deef3..2e0028f 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,8 +49,20 @@ 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
+# 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)
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.*"
},
diff --git a/src/ClassyGeeks/Potion/BladeHelpers.php b/src/ClassyGeeks/Potion/BladeHelpers.php
index f6fadfe..c8554b6 100644
--- a/src/ClassyGeeks/Potion/BladeHelpers.php
+++ b/src/ClassyGeeks/Potion/BladeHelpers.php
@@ -1,6 +1,6 @@
";
+ return "\n";
}
/**
* 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 ?
+ $defer = $defer ? 'defer' : '';
+
// Return
- return "";
+ return "\n";
}
/**
@@ -123,6 +127,6 @@ public static function assetImg($name, $version = false)
$url = self::assetUrl($name, $version);
// Return
- return "";
+ return "\n";
}
-}
\ No newline at end of file
+}
diff --git a/src/ClassyGeeks/Potion/Console/Command/ClearAssetsCommand.php b/src/ClassyGeeks/Potion/Console/Command/ClearAssetsCommand.php
index 2ea4767..ef569ca 100644
--- a/src/ClassyGeeks/Potion/Console/Command/ClearAssetsCommand.php
+++ b/src/ClassyGeeks/Potion/Console/Command/ClearAssetsCommand.php
@@ -1,6 +1,6 @@