Skip to content

learn-symfony/css-compiler

Repository files navigation

Latest Stable Version Total Downloads License composer.lock

PHP CSS Compiler

compiles SASS and LESS sources into CSS can be triggered from composer's script's session: compiles LESS/SASS/Compass

How to use:

composer require "eugene-matvejev/css-compiler"

add into composer scripts directory:

"EM\\CssCompiler\\Handler\\ScriptHandler::compileCSS"

if you have problem with min-stability you can use this solution in 'require' or 'require-dev':

    "eugene-matvejev/css-compiler": "^0.1",
    "leafo/scssphp-compass": "@dev",
    "leafo/scssphp": "@dev",

example:

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

add css-compiler information inside of the extra composer configuration

  • format: compression format
  • input: array of routes, all files inside of the route if it is directory will be picked up
  • output: file where it should put content (hard-copy)

example:

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

About

generate CSS from SCSS|LESS, has Composer callback script

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •