Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattrmiller/laravel-potion
laravel - Potion is a pure PHP asset manager for Laravel 5 based off of Assetic.
https://github.com/mattrmiller/laravel-potion
artisan-command assets assets-management css elixir js laravel laravel-5-package laravel-framework laravel-potion php potions yui
Last synced: 28 days ago
JSON representation
laravel - Potion is a pure PHP asset manager for Laravel 5 based off of Assetic.
- Host: GitHub
- URL: https://github.com/mattrmiller/laravel-potion
- Owner: mattrmiller
- License: mit
- Created: 2015-03-20T03:58:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-24T19:12:27.000Z (over 6 years ago)
- Last Synced: 2024-07-30T13:13:41.722Z (3 months ago)
- Topics: artisan-command, assets, assets-management, css, elixir, js, laravel, laravel-5-package, laravel-framework, laravel-potion, php, potions, yui
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 61
- Watchers: 5
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-potion
Potion is a pure PHP asset manager for Laravel based off of [Assetic](https://github.com/kriswallsmith/assetic).
# 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
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
- Fully integrated into Laravels' artisan commands
- Asset versioning support
- Asset CDN Url support
- Blade Helpers for Asset inclusion in templates
- Command to clear all assets already published on disk
- Makes use of Cache configuration, and not disk, in order to account for load balanced servers.
- Supports the following filters from Assetic:
- OptiPngFilter
- CssImportFilter
- CssRewriteFilter
- CssMinFilter
- CssCompressorFilter from YUI
- LessphpFilter
- JSMinFilter
- JpegoptimFilter
- JsCompressorFilter from YUI
- ScssphpFilter
# 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:
```php
'providers' => [
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
...
'ClassyGeeks\Potion\PotionServiceProvider'
...
],
```3) Publish the config file
```php
php artisan vendor:publish
```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
- 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)