@@ -49,18 +49,8 @@ Name | Version
49
49
50
50
### With composer (the faster way)
51
51
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
-
62
52
``` bash
63
- $ php composer.phar update
53
+ $ php composer.phar install neilime/php-css-lint
64
54
```
65
55
66
56
### By cloning project (manual)
@@ -76,7 +66,7 @@ Name | Version
76
66
In a terminal, execute :
77
67
78
68
``` bash
79
- $ bin/php-css-lint
69
+ $ php vendor/ bin/php-css-lint
80
70
```
81
71
82
72
Result :
@@ -97,6 +87,9 @@ Usage :
97
87
------------------------------------------------------------
98
88
Lint a CSS file :
99
89
bin/php-css-lint css_file_path_to_lint.css
90
+
91
+ Lint a CSS string :
92
+ scripts/php-css-lint ".test { color: red; }"
100
93
------------------------------------------------------------
101
94
```
102
95
@@ -129,6 +122,35 @@ Result :
129
122
- Unexpected char ":" (line: 15, char: 5)
130
123
```
131
124
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
+
132
154
## In a php script
133
155
134
156
### Composer autoloading
0 commit comments