2017 © Pedro Peláez
 

library silex-assetic

Silex 2.0+ service provider for Assetic library

image

lokhman/silex-assetic

Silex 2.0+ service provider for Assetic library

  • Tuesday, March 14, 2017
  • by lokhman
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1,601 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 13 % Grown

The README.md

silex-assetic

StyleCI, (*1)

Service provider to support Assetic library for Silex 2.0+ micro-framework., (*2)

This project is a part of silex-tools library., (*3)

Installation

You can install silex-assetic with Composer:, (*4)

composer require lokhman/silex-assetic

Documentation

Register AsseticServiceProvider in your application with the following code:, (*5)

use Lokhman\Silex\Provider\AsseticServiceProvider;

$app->register(new AsseticServiceProvider());

N.B.: Assetic will always be in debug mode if $app['debug'] is TRUE., (*6)

Configuration

Configuration is mostly the same as you have for AsseticBundle in Symfony framework., (*7)

"assetic.options": {
    "prefix": "/",
    "input_dir": "src",
    "output_dir": "web",
    "cache_dir": "cache/assetic",
    "twig_functions": [],
    "java": "/usr/bin/java",
    "ruby": "/usr/bin/ruby",
    "node": "/usr/bin/node",
    "node_paths": [],
    "filters": {
        "some_filter": {}
    },
    "assets": {
        "some_asset": {
            "inputs": [],
            "filters": [],
            "options": {}
        }
    }
}

Filters

Filters are defined in FilterFactory class and mirror names and options of AsseticBundle., (*8)

Twig

Twig extension is enabled automatically if you have TwigServiceProvider registered for the application., (*9)

Console

You can use console command with silex-console service provider simply adding DumpCommand to the console application., (*10)

use Lokhman\Silex\Console\Console;
use Lokhman\Silex\Console\Command\Assetic\DumpCommand;

$console = new Console($app);
$console->add(new DumpCommand());
$console->run();

Further reading

For more details please refer to the asset management documentation of Symfony framework., (*11)

License

Library is available under the MIT license. The included LICENSE file describes this in detail., (*12)

The Versions

14/03 2017

dev-master

9999999-dev

Silex 2.0+ service provider for Assetic library

  Sources   Download

MIT

The Requires

 

by Alexander Lokhman

silex tools assetic

14/03 2017

2.0.2

2.0.2.0

Silex 2.0+ service provider for Assetic library

  Sources   Download

MIT

The Requires

 

by Alexander Lokhman

silex tools assetic

06/03 2017

2.0.1

2.0.1.0

Silex 2.0+ service provider for Assetic library

  Sources   Download

MIT

The Requires

 

by Alexander Lokhman

silex tools assetic

02/03 2017

2.0.0

2.0.0.0

Silex 2.0+ service provider for Assetic library

  Sources   Download

MIT

The Requires

 

by Alexander Lokhman

silex tools assetic