2017 © Pedro Peláez
 

library assetic-autoprefixer

autoprefixer-php filter for kriswallsmith/assetic

image

netzmacht/assetic-autoprefixer

autoprefixer-php filter for kriswallsmith/assetic

  • Thursday, March 19, 2015
  • by netzmacht
  • Repository
  • 3 Watchers
  • 8 Stars
  • 7,892 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 2 Versions
  • 8 % Grown

The README.md

Version Stable Build Status Upstream Build Status License Downloads, (*1)

Autoprefixer filter

This is a filter implementation to use Autoprefixer within the PHP assetic framework., (*2)

Requirements

kriswallsmith/assetic is required to be installed in your php project. postcss/autoprefixer is required to be installed on your system., (*3)

Install kriswallsmith/assetic with composer

php composer.phar require kriswallsmith/assetic ~1.0

Install autoprefixer globally on your system

sudo npm install -g autoprefixer

Install autoprefixer locally on your system

npm install autoprefixer

Usage in PHP

use Bit3\Assetic\Filter\Autoprefixer\AutoprefixerFilter;

// if you have installed autoprefixer globally
$autoprefixerBinary = '/usr/bin/autoprefixer';

// if you have installed autoprefixer locally
$autoprefixerBinary = '/../node_modules/.bin/autoprefixer';

$autoprefixerFilter = new AutoprefixerFilter($autoprefixerBinary);

// if node.js binary is not installed as /usr/bin/node
// (e.g. on debian/ubuntu the binary is named /usr/bin/nodejs)
$autoprefixerFilter->setNodeBin('/usr/bin/nodejs');

Usage in Symfony2

This project comes with a assetic filter configuration file, located in the config directory., (*4)

Define the autoprefixer binary path in the parameters.yml:, (*5)

parameters:
  # if you have installed autoprefixer globally
  assetic.autoprefixer.bin: /usr/bin/autoprefixer

  # if you have installed autoprefixer locally
  assetic.autoprefixer.bin: %kernel.root_dir%/../node_modules/.bin/autoprefixer

  # if node.js binary is not installed as /usr/bin/node
  # (e.g. on debian/ubuntu the binary is named /usr/bin/nodejs)
  assetic.node.bin: /usr/bin/nodejs

Then enable the filter in the assetic configuration chapter:, (*6)

# Assetic Configuration
assetic:
    filters:
        autoprefixer:
          resource: "%kernel.root_dir%/../vendor/netzmacht/assetic-autoprefixer/config/autoprefixer.xml"
          # if you like, you can use apply_to here :-)
          # e.g, apply_to: "\.css"
          # otherwise you use the filter in your template with filter="autoprefixer"

The Versions

19/03 2015

dev-master

9999999-dev http://netzmacht.de

autoprefixer-php filter for kriswallsmith/assetic

  Sources   Download

MIT

The Requires

 

The Development Requires

css assets vendor-prefix

05/02 2015

dev-develop

dev-develop http://netzmacht.de

autoprefixer-php filter for kriswallsmith/assetic

  Sources   Download

MIT

The Requires

 

The Development Requires

css assets vendor-prefix