eugene-matvejev/css-compiler

compiles SASS and LESS assets on composer's callback

1.0.1 2017-03-06 14:20 UTC

This package is not auto-updated.

Last update: 2024-04-13 16:56:42 UTC


README

Scrutinizer Code Quality codecov SensioLabsInsight

HHVM Status

Latest Stable Version Total Downloads License composer.lock

PHP CSS compiler with composer handler

can be triggered from composer's script's section: compiles SCSS with compass|LESS

how to use

composer require eugene-matvejev/css-compiler

add callback into into composer's scripts

"EM\\CssCompiler\\ScriptHandler::generateCSS"

example

"scripts": {
    "post-update-cmd": "@custom-events",
    "post-install-cmd": "@custom-events",
    "custom-events": [
        "EM\\CssCompiler\\ScriptHandler::generateCSS"
    ]
}

add css-compiler information inside of the extra composer configuration

  • format: compression format
  • input: array of relative paths to the composer.json, all files will be picked up recursivly inside of the directory
  • output: relative file path to the composer.json, where to save output (hard-copy)

example

"extra": {
    "css-compiler": [
        {
            "format": "compact",
            "input": [
                "tests/shared-fixtures/compass/app.scss"
            ],
            "output": "var/cache/assets/compass.css"
        },
        {
            "format": "compact",
            "input": [
                "tests/shared-fixtures/sass"
            ],
            "output": "var/cache/assets/sass.css"
        }
    ]
}