@@ -49,18 +49,8 @@ Name | Version
4949
5050### With composer (the faster way)
5151
52- 1 . Add this project in your composer.json:
53-
54- ``` json
55- "require" : {
56- "neilime/php-css-lint" : " 1.*@stable"
57- }
58- ```
59-
60- 2 . Now tell composer to download __ ANSI escapes to Html__ by running the command:
61-
6252``` bash
63- $ php composer.phar update
53+ $ php composer.phar install neilime/php-css-lint
6454```
6555
6656### By cloning project (manual)
@@ -76,7 +66,7 @@ Name | Version
7666In a terminal, execute :
7767
7868``` bash
79- $ bin/php-css-lint
69+ $ php vendor/ bin/php-css-lint
8070```
8171
8272Result :
@@ -97,6 +87,9 @@ Usage :
9787------------------------------------------------------------
9888Lint a CSS file :
9989bin/php-css-lint css_file_path_to_lint.css
90+
91+ Lint a CSS string :
92+ scripts/php-css-lint ".test { color: red; }"
10093------------------------------------------------------------
10194```
10295
@@ -129,6 +122,35 @@ Result :
129122 - Unexpected char ":" (line: 15, char: 5)
130123```
131124
125+ ### Lint a css script
126+
127+ In a terminal, execute :
128+
129+ ``` bash
130+ $ bin/php-css-lint " .test { color: red; fail }"
131+ ```
132+
133+ Result :
134+
135+ ```
136+ ===========================================================
137+
138+ ____ _ ____ ____ ____ _ _ _
139+ | _ \| |__ _ __ / ___/ ___/ ___| | | (_)_ __ | |_
140+ | |_) | '_ \| '_ \ | | \___ \___ \ | | | | '_ \| __|
141+ | __/| | | | |_) | | |___ ___) |__) | | |___| | | | | |_
142+ |_| |_| |_| .__/ \____|____/____/ |_____|_|_| |_|\__|
143+ |_|
144+
145+ ===========================================================
146+
147+ # Lint css string...
148+ => Css string is not valid :
149+
150+ - Unexpected property name token "}" (line: 1, char: 26)
151+ - Unterminated "property name" (line: 1, char: 26)
152+ ```
153+
132154## In a php script
133155
134156### Composer autoloading
0 commit comments