Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
neilime committed Apr 9, 2018
1 parent fea3f1f commit ac0cb27
Showing 1 changed file with 34 additions and 12 deletions.
46 changes: 34 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,8 @@ Name | Version

### With composer (the faster way)

1. Add this project in your composer.json:

```json
"require": {
"neilime/php-css-lint": "1.*@stable"
}
```

2. Now tell composer to download __ANSI escapes to Html__ by running the command:

```bash
$ php composer.phar update
$ php composer.phar install neilime/php-css-lint
```

### By cloning project (manual)
Expand All @@ -76,7 +66,7 @@ Name | Version
In a terminal, execute :

```bash
$ bin/php-css-lint
$ php vendor/bin/php-css-lint
```

Result :
Expand All @@ -97,6 +87,9 @@ Usage :
------------------------------------------------------------
Lint a CSS file :
bin/php-css-lint css_file_path_to_lint.css
Lint a CSS string :
scripts/php-css-lint ".test { color: red; }"
------------------------------------------------------------
```

Expand Down Expand Up @@ -129,6 +122,35 @@ Result :
- Unexpected char ":" (line: 15, char: 5)
```

### Lint a css script

In a terminal, execute :

```bash
$ bin/php-css-lint ".test { color: red; fail }"
```

Result :

```
===========================================================
____ _ ____ ____ ____ _ _ _
| _ \| |__ _ __ / ___/ ___/ ___| | | (_)_ __ | |_
| |_) | '_ \| '_ \ | | \___ \___ \ | | | | '_ \| __|
| __/| | | | |_) | | |___ ___) |__) | | |___| | | | | |_
|_| |_| |_| .__/ \____|____/____/ |_____|_|_| |_|\__|
|_|
===========================================================
# Lint css string...
=> Css string is not valid :
- Unexpected property name token "}" (line: 1, char: 26)
- Unterminated "property name" (line: 1, char: 26)
```

## In a php script

### Composer autoloading
Expand Down

0 comments on commit ac0cb27

Please sign in to comment.