Skip to content

Commit 9a47c89

Browse files
committed
Merge pull request #403 from nicks/nick-cli2
simplify the command-line api
2 parents 0cef3a4 + bb2ab45 commit 9a47c89

File tree

3 files changed

+148
-45
lines changed

3 files changed

+148
-45
lines changed

README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,29 @@ More detailed information about running the Closure Compiler is available in the
7676
If you have multiple scripts, you should compile them all together with one
7777
compile command.
7878

79+
```bash
80+
java -jar compiler.jar --js_output_file=out.js in1.js in2.js in3.js ...
7981
```
80-
java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js
82+
83+
You can also use minimatch-style globs.
84+
85+
```bash
86+
# Recursively include all js files in subdirs
87+
java -jar compiler.jar --js_output_file=out.js 'src/**.js'
88+
89+
# Recursively include all js files in subdirs, exclusing test files.
90+
# Use single-quotes, so that bash doesn't try to expand the '!'
91+
java -jar compiler.jar --js_output_file=out.js 'src/**.js' '!**_test.js'
8192
```
8293

8394
The Closure Compiler will concatenate the files in the order they're passed at
8495
the command line.
8596

86-
If you need to compile many, many scripts together, you may start to run into
97+
If you're using globs or many files, you may start to run into
8798
problems with managing dependencies between scripts. In this case, you should
8899
use the [Closure Library](https://developers.google.com/closure/library/). It
89-
contains functions for enforcing dependencies between scripts, and a tool
90-
called ````calcdeps.py```` that knows how to give scripts to the Closure Compiler
91-
in the right order.
100+
contains functions for enforcing dependencies between scripts, and Closure Compiler
101+
will re-order the inputs automatically.
92102

93103
## How to Contribute
94104
### Reporting a bug

0 commit comments

Comments
 (0)