Skip to content

Commit 003b660

Browse files
committed
Updated closure compiler.
1 parent d748c94 commit 003b660

File tree

5 files changed

+47
-33
lines changed

5 files changed

+47
-33
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"scripts": {
1414
"build": "rollup -c",
1515
"build-uglify": "rollup -c && uglifyjs build/stats.js -cm --preamble \"// stats.js - http://github.com/mrdoob/stats.js\" > build/stats.min.js",
16-
"build-closure": "rollup -c && java -jar utils/compiler/compiler.jar --language_in=ECMASCRIPT5_STRICT --js build/stats.js --js_output_file build/stats.min.js",
16+
"build-closure": "rollup -c && java -jar utils/compiler/closure-compiler-v20160713.jar --language_in=ECMASCRIPT5_STRICT --js build/stats.js --js_output_file build/stats.min.js",
1717
"test": "echo \"Error: no test specified\" && exit 1"
1818
},
1919
"repository": {

utils/builder.py

-9
This file was deleted.

utils/compiler/COPYING

100755100644
File mode changed.

utils/compiler/README.md

100755100644
+46-23
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,41 @@ The [Closure Compiler](https://developers.google.com/closure/compiler/) is a too
2020

2121
Note: The Closure Compiler requires [Java 7 or higher](http://www.java.com/).
2222

23-
### Using [Ant](http://ant.apache.org/)
24-
25-
1. Download the [Ant build tool](http://ant.apache.org/bindownload.cgi).
26-
27-
2. At the root of the source tree, there is an Ant file named ```build.xml```.
28-
To use it, navigate to the same directory and type the command
29-
30-
```
31-
ant jar
32-
```
33-
34-
This will produce a jar file called ```build/compiler.jar```.
23+
### Using [Maven](http://maven.apache.org/)
24+
25+
1. Download [Maven](http://maven.apache.org/download.cgi).
26+
27+
2. Add sonatype snapshots repository to `~/.m2/settings.xml`:
28+
```
29+
<profile>
30+
<id>allow-snapshots</id>
31+
<activation><activeByDefault>true</activeByDefault></activation>
32+
<repositories>
33+
<repository>
34+
<id>snapshots-repo</id>
35+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
36+
<releases><enabled>false</enabled></releases>
37+
<snapshots><enabled>true</enabled></snapshots>
38+
</repository>
39+
</repositories>
40+
</profile>
41+
```
42+
43+
3. Run `mvn -DskipTests` (omit the `-DskipTests` if you want to run all the
44+
unit tests too).
45+
46+
This will produce a jar file called `target/closure-compiler-1.0-SNAPSHOT.jar`.
3547

3648
### Using [Eclipse](http://www.eclipse.org/)
3749

3850
1. Download and open the [Eclipse IDE](http://www.eclipse.org/).
39-
2. Navigate to ```File > New > Project ...``` and create a Java Project. Give
51+
2. Navigate to `File > New > Project ...` and create a Java Project. Give
4052
the project a name.
41-
3. Select ```Create project from existing source``` and choose the root of the
53+
3. Select `Create project from existing source` and choose the root of the
4254
checked-out source tree as the existing directory.
43-
3. Navigate to the ```build.xml``` file. You will see all the build rules in
44-
the Outline pane. Run the ```jar``` rule to build the compiler in
45-
```build/compiler.jar```.
55+
3. Navigate to the `build.xml` file. You will see all the build rules in
56+
the Outline pane. Run the `jar` rule to build the compiler in
57+
`build/compiler.jar`.
4658

4759
## Running
4860

@@ -91,7 +103,7 @@ You can also use minimatch-style globs.
91103
# Recursively include all js files in subdirs
92104
java -jar compiler.jar --js_output_file=out.js 'src/**.js'
93105

94-
# Recursively include all js files in subdirs, exclusing test files.
106+
# Recursively include all js files in subdirs, excluding test files.
95107
# Use single-quotes, so that bash doesn't try to expand the '!'
96108
java -jar compiler.jar --js_output_file=out.js 'src/**.js' '!**_test.js'
97109
```
@@ -118,10 +130,21 @@ will re-order the inputs automatically.
118130
1. Consult the [FAQ](https://github.com/google/closure-compiler/wiki/FAQ) to make sure that the behaviour you would like isn't specifically excluded (such as string inlining).
119131
2. Make sure someone hasn't requested the same thing. See the list of [known issues](https://github.com/google/closure-compiler/issues).
120132
3. Read up on [what type of feature requests are accepted](https://github.com/google/closure-compiler/wiki/FAQ#how-do-i-submit-a-feature-request-for-a-new-type-of-optimization).
121-
4. Submit your reqest as an issue.
133+
4. Submit your request as an issue.
122134

123135
### Submitting patches
124-
1. All contributors must sign a contributor license agreement. See the [CONTRIBUTORS](https://raw.githubusercontent.com/google/closure-compiler/master/CONTRIBUTORS) file for details.
136+
1. All contributors must sign a contributor license agreement (CLA).
137+
A CLA basically says that you own the rights to any code you contribute,
138+
and that you give us permission to use that code in Closure Compiler.
139+
You maintain the copyright on that code.
140+
If you own all the rights to your code, you can fill out an
141+
[individual CLA](http://code.google.com/legal/individual-cla-v1.0.html).
142+
If your employer has any rights to your code, then they also need to fill out
143+
a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html).
144+
If you don't know if your employer has any rights to your code, you should
145+
ask before signing anything.
146+
By default, anyone with an @google.com email address already has a CLA
147+
signed for them.
125148
2. To make sure your changes are of the type that will be accepted, ask about your patch on the [Closure Compiler Discuss Group](https://groups.google.com/forum/#!forum/closure-compiler-discuss)
126149
3. Fork the repository.
127150
4. Make your changes.
@@ -234,7 +257,7 @@ options/arguments in your CUI application.</td>
234257

235258
<tr>
236259
<td>Version</td>
237-
<td>18.0</td>
260+
<td>20.0</td>
238261
</tr>
239262

240263
<tr>
@@ -331,7 +354,7 @@ options/arguments in your CUI application.</td>
331354

332355
<tr>
333356
<td>URL</td>
334-
<td>http://code.google.com/p/protobuf/</td>
357+
<td>https://github.com/google/protobuf</td>
335358
</tr>
336359

337360
<tr>
@@ -437,7 +460,7 @@ without make's wrinkles and with the full portability of pure java code.</td>
437460

438461
<tr>
439462
<td>URL</td>
440-
<td>https://code.google.com/p/google-gson/</td>
463+
<td>https://github.com/google/gson</td>
441464
</tr>
442465

443466
<tr>
5.95 MB
Binary file not shown.

0 commit comments

Comments
 (0)