2017 © Pedro Peláez
 

library saxulum-assetic-twig-provider

Saxulum Assetic Twig Provider

image

saxulum/saxulum-assetic-twig-provider

Saxulum Assetic Twig Provider

  • Friday, April 20, 2018
  • by dominikzogg
  • Repository
  • 1 Watchers
  • 6 Stars
  • 1,662 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 2 Forks
  • 0 Open issues
  • 23 Versions
  • 0 % Grown

The README.md

saxulum-assetic-twig-provider

works with plain silex-php, (*1)

Build Status Total Downloads Latest Stable Version, (*2)

Features

  • Add assetic support for twig templates

Requirements

  • PHP 5.3+
  • Kriswallsmith's Assets Framework (Assetic) 1.2+
  • Pimple >=2.1,<4
  • Symfony Finder Component 2.3+
  • Twig 1.2+

Installation

Through Composer as saxulum/saxulum/saxulum-assetic-twig-provider., (*3)

``` {.php} $container->register(new TwigServiceProvider());, (*4)

$container['twig.loader.filesystem'] = $container->extend('twig.loader.filesystem', function (\Twig_Loader_Filesystem $twigLoaderFilesystem) { $twigLoaderFilesystem->addPath('/path/to/the/views', 'SomeNamespace');, (*5)

    return $twigLoaderFilesystem;
}

);, (*6)

$container->register(new AsseticTwigProvider(), array( 'assetic.asset.root' => '/path/to/project/root', 'assetic.asset.asset_root' => '/path/to/asset/root', ));, (*7)


Configuration ------------- This filter are preconfigured, and active per default: * csscopyfile * lessphp * scssphp * cssmin * csscompress * jsmin If you want to disable a default filter: ``` {.php} $container['assetic.filters'] = $container->extend('assetic.filters', function ($filters) use ($container) { $filters['cssmin'] = false; return $filters; } );

If you want to add more filters, which aren't preconfigured:, (*8)

``` {.php} $container['assetic.filterinstances'] = $container->extend('assetic.filterinstances', function ($filterInstances) use ($container) { $filterInstances['jsminplus'] = new JSMinPlusFilter();, (*9)

    return $filterInstances;
}

);, (*10)


Usage ----- CSS example ``` {.twig} {% stylesheets 'relative/from/path/to/project/root/*.css' output='relative/from/path/to/asset/root/css/test.css' filter='cssmin' %} {{ asset_url }} {% endstylesheets %}

JS example, (*11)

{.twig} {% javascripts 'relative/from/path/to/project/root/*.js' output='relative/from/path/to/asset/root/css/test.js' filter='jsmin' %} {{ asset_url }} {% endjavascripts %}, (*12)

The Versions

20/04 2018

v1.x-dev

1.9999999.9999999.9999999-dev

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

01/12 2015
01/12 2015

1.x-dev

1.9999999.9999999.9999999-dev

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

01/12 2015
29/11 2015
29/11 2015
29/11 2015
29/11 2015
29/11 2015
29/11 2015
28/01 2015

1.4.1

1.4.1.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

28/01 2015
14/10 2014
14/10 2014

1.4.0

1.4.0.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

01/05 2014

1.3.0

1.3.0.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

14/01 2014

1.2.1

1.2.1.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

14/01 2014

1.2.0

1.2.0.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

12/01 2014

1.1.2

1.1.2.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

12/01 2014

1.1.1

1.1.1.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

12/01 2014

1.1.0

1.1.0.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

11/01 2014

1.0.1

1.0.1.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum

11/01 2014

1.0

1.0.0.0

Saxulum Assetic Twig Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

twig silex pimple assetic cilex saxulum