2017 © Pedro Peláez
 

library potion

Potion is a pure PHP asset manager for Laravel based off of Assetic.

image

classygeeks/potion

Potion is a pure PHP asset manager for Laravel based off of Assetic.

  • Thursday, September 7, 2017
  • by Classy Geeks
  • Repository
  • 6 Watchers
  • 64 Stars
  • 660 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 6 Forks
  • 6 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

laravel-potion

Potion is a pure PHP asset manager for Laravel based off of Assetic., (*1)

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 that allows you to handle your assets in the same technology stack that your application is written in., (*2)

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., (*3)

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., (*4)

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:, (*5)

2) Add the Potion Service provider to your config/app.php file under the predefined "providers" array:, (*6)

'providers' => [
    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    ...
    'ClassyGeeks\Potion\PotionServiceProvider'
    ...
    ],

3) Publish the config file, (*7)

    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., (*8)

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, (*9)

Contributors

Matthew R. Miller, (*10)

License

MIT License, (*11)

The Versions

07/09 2017

dev-master

9999999-dev

Potion is a pure PHP asset manager for Laravel based off of Assetic.

  Sources   Download

MIT

The Requires

 

laravel cssmin jsmin assets less minify sass scss compass minifying asset-processing asset-management

06/07 2015

v1.0.3

1.0.3.0

Potion is a pure PHP asset manager for Laravel based off of Assetic.

  Sources   Download

MIT

The Requires

 

laravel cssmin jsmin assets less minify sass scss compass minifying asset-processing asset-management

16/06 2015

v1.0.2

1.0.2.0

Potion is a pure PHP asset manager for Laravel based off of Assetic.

  Sources   Download

MIT

The Requires

 

laravel cssmin jsmin assets less minify sass scss compass minifying asset-processing asset-management

29/05 2015

v1.0.1

1.0.1.0

Potion is a pure PHP asset manager for Laravel based off of Assetic.

  Sources   Download

MIT

The Requires

 

laravel cssmin jsmin assets less minify sass scss compass minifying asset-processing asset-management

29/05 2015

v1.0.0

1.0.0.0

Potion is a pure PHP asset manager for Laravel based off of Assetic.

  Sources   Download

MIT

The Requires

 

laravel cssmin jsmin assets less minify sass scss compass minifying asset-processing asset-management