Skip to content

Commit fecf832

Browse files
committed
BREAKING: Update globby to version 7.1.1; expand directories
Resolve #181
1 parent 4b2421b commit fecf832

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ npm i -g|-D postcss-cli
2626
Usage:
2727
postcss [input.css] [OPTIONS] [-o|--output output.css] [--watch|-w]
2828
postcss <input.css>... [OPTIONS] --dir <output-directory> [--watch|-w]
29+
postcss <input-directory> [OPTIONS] --dir <output-directory> [--watch|-w]
2930
postcss <input.css>... [OPTIONS] --replace
3031
3132
Basic options:
@@ -63,17 +64,13 @@ If no input files are passed, it reads from stdin. If neither -o, --dir, or
6364
--replace is passed, it writes to stdout.
6465
6566
If there are multiple input files, the --dir or --replace option must be passed.
66-
Input files may contain globs.
67+
68+
Input files may contain globs. If you pass an input directory, it will process
69+
all files in the directory and any subdirectories.
6770
```
6871

6972
> ℹ️ More details on custom parsers, stringifiers and syntaxes, can be found [here](https://github.com/postcss/postcss#syntaxes).
7073
71-
To recursively read a directory, you'd do:
72-
73-
```bash
74-
postcss "src/**/*.css" [OPTIONS]
75-
```
76-
7774
### [Config](https://github.com/michael-ciniawsky/postcss-load-config)
7875

7976
If you need to pass options to your plugins, or have a long plugin chain, you'll want to use a configuration file.

lib/args.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ module.exports = require('yargs')
3232
Usage:
3333
$0 [input.css] [OPTIONS] [-o|--output output.css] [--watch|-w]
3434
$0 <input.css>... [OPTIONS] --dir <output-directory> [--watch|-w]
35+
$0 <input-directory> [OPTIONS] --dir <output-directory> [--watch|-w]
3536
$0 <input.css>... [OPTIONS] --replace`
3637
)
3738
.group(['o', 'd', 'r', 'map', 'no-map', 'watch', 'env'], 'Basic options:')
@@ -129,7 +130,9 @@ Usage:
129130
.epilog(
130131
`If no input files are passed, it reads from stdin. If neither -o, --dir, or --replace is passed, it writes to stdout.
131132
132-
If there are multiple input files, the --dir or --replace option must be passed. Input files may contain globs.
133+
If there are multiple input files, the --dir or --replace option must be passed.
134+
135+
Input files may contain globs. If you pass an input directory, it will process all files in the directory and any subdirectories.
133136
134137
For more details, please see https://github.com/postcss/postcss-cli`
135138
).argv

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"dependency-graph": "^0.7.0",
2323
"fs-extra": "^4.0.1",
2424
"get-stdin": "^5.0.1",
25-
"globby": "^6.1.0",
25+
"globby": "^7.1.1",
2626
"ora": "1.3.0",
2727
"postcss": "^6.0.1",
2828
"postcss-load-config": "^1.1.0",

0 commit comments

Comments
 (0)