Skip to content

Commit a6bce74

Browse files
themochRyanZim
authored andcommitted
Updated readme.me to include information about glob-patterns (#211)
* updated readme.me * updates to --help
1 parent eb9aea9 commit a6bce74

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Usage:
2727
postcss [input.css] [OPTIONS] [-o|--output output.css] [--watch|-w]
2828
postcss <input.css>... [OPTIONS] --dir <output-directory> [--watch|-w]
2929
postcss <input-directory> [OPTIONS] --dir <output-directory> [--watch|-w]
30+
postcss <input-glob-pattern> [OPTIONS] --dir <output-directory> [--watch|-w]
3031
postcss <input.css>... [OPTIONS] --replace
3132
3233
Basic options:
@@ -59,15 +60,16 @@ Options:
5960
6061
Examples:
6162
postcss input.css -o output.css Basic usage
63+
postcss src/**/*.css --base src --dir build Glob Pattern & output
6264
cat input.css | postcss -u autoprefixer > output.css Piping input & output
6365
6466
If no input files are passed, it reads from stdin. If neither -o, --dir, or
6567
--replace is passed, it writes to stdout.
6668
6769
If there are multiple input files, the --dir or --replace option must be passed.
6870
69-
Input files may contain globs. If you pass an input directory, it will process
70-
all files in the directory and any subdirectories.
71+
Input files may contain globs (ie: src/**/*.css). If you pass an input directory, it will process
72+
all files in the directory and any subdirectories, respecting the glob pattern.
7173
```
7274

7375
> ℹ️ More details on custom parsers, stringifiers and syntaxes, can be found [here](https://github.com/postcss/postcss#syntaxes).

lib/args.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Usage:
3333
$0 [input.css] [OPTIONS] [-o|--output output.css] [--watch|-w]
3434
$0 <input.css>... [OPTIONS] --dir <output-directory> [--watch|-w]
3535
$0 <input-directory> [OPTIONS] --dir <output-directory> [--watch|-w]
36+
$0 <input-glob-pattern> [OPTIONS] --dir <output-directory> [--watch|-w]
3637
$0 <input.css>... [OPTIONS] --replace`
3738
)
3839
.group(
@@ -129,6 +130,7 @@ Usage:
129130
.version(version)
130131
.alias('h', 'help')
131132
.example('$0 input.css -o output.css', 'Basic usage')
133+
.example('$0 src/**/*.css --base src --dir build', 'Glob Pattern & output')
132134
.example(
133135
'cat input.css | $0 -u autoprefixer > output.css',
134136
'Piping input & output'
@@ -138,7 +140,7 @@ Usage:
138140
139141
If there are multiple input files, the --dir or --replace option must be passed.
140142
141-
Input files may contain globs. If you pass an input directory, it will process all files in the directory and any subdirectories.
143+
Input files may contain globs (ie: src/**/*.css). If you pass an input directory, it will process all files in the directory and any subdirectories, respecting the glob pattern.
142144
143145
For more details, please see https://github.com/postcss/postcss-cli`
144146
).argv

0 commit comments

Comments
 (0)