Skip to content

learn-symfony/css-compiler

Repository files navigation

CSS Compiler

  • can be triggered from composer's script's session: compiles LESS/SASS/Compass

How to use:

  1. add into composer scripts directory:
"EM\\CssCompiler\\Handler\\ScriptHandler::compileCSS"

example:

    "scripts": {
        "post-update-cmd": "@custom-events",
        "post-install-cmd": "@custom-events",
        "custom-events": [
            "EM\\CssCompiler\\Handler\\ScriptHandler::compileCSS"
        ]
    },
  1. add css-compiler information inside of the extra composer configuration
    "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"
        }
    ]

#legend 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)

About

generate CSS from SCSS|LESS, has Composer callback script

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •