eugene-matvejev / css-compiler
compiles SASS and LESS assets on composer's callback
Installs: 1 496
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 1
Type:lib
Requires
- php: >= 5.5.9 || 7.0.0 - 7.0.4 || >= 7.0.6
- eugene-matvejev/compass: ^0.1
- leafo/lessphp: ^0.5
Requires (Dev)
- composer/composer: ^1.1
- phpunit/phpunit: ^4.8 || ^5.3
README
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"
}
]
}