Download the PHP package fdevs/css-fixer-bundle without Composer
On this page you can find all versions of the php package fdevs/css-fixer-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fdevs/css-fixer-bundle
More information about fdevs/css-fixer-bundle
Files in fdevs/css-fixer-bundle
Package css-fixer-bundle
Short Description Allows you to check if .css files follow general rules and convention or fix them
License MIT
Informations about the package css-fixer-bundle
CssFixerBundle
This bundle wraps csscombjs and adds a CSS code style validation to your project
Requirements
The npm
executable must be available in PATH
Installation
1) Add a dependency to your composer.json file:
You need this bundle only for development, so use require-dev
section of the composer.json
file.
2) Install the package to your project via composer:
3) Add the bundle to your AppKernel.php
file:
As before, register this bundle in the dev
environment only, so it won't consume memory in the prod
environment.
Here FDevsCssFixerBundle
is ready to use. Its default configuration allows it to check all
your
bundles, that are living inside src
folder.
Examples of usage
Validation of .css files
This bundle has console command:
or its alias:
By default it works in lint
mode, just shows files that aren't following code style conventions.
You can use next options:
How to see all configuration options and their default values
To see all available options and examples of values, you can use a standard console command:
It will show you all necessary information to quickly anderstand and customize the bundle to your needs.
Customizing bundle to own needs and code style conventions
The bundle has 3 main sections in its configuration:
include
- here you can add bundles you want to check .css files in.exclude
- here you can add list of bundles you don't want to check.rules
- here you can set up each of more than 20 options available for csscomb fixer.
Example of configuration
Priority for bundles is next (from the lowest):
- all your bundles (if neither
include
norexclue
provided, then all your bundles will be checked) - include (will replace all if provided)
- exclude (will remove bundles both from all or
include
)