You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Bump closure compiler to v20170521
* update closure library to v20170521
* use typed tagnames rather than strings
* remove use of pathIsModule closure method
*[Use the JavaScript version](https://github.com/google/closure-compiler-js), with no Java dependency
12
13
* See the [Google Developers Site](https://developers.google.com/closure/compiler/docs/gettingstarted_app) for documentation including instructions for running the compiler from the command line.
13
14
14
15
## Options for Getting Help
15
-
1. Post in the [Closure Compiler Discuss Group](https://groups.google.com/forum/#!forum/closure-compiler-discuss)
16
-
2. Ask a question on [Stack Overflow](http://stackoverflow.com/questions/tagged/google-closure-compiler)
17
-
3. Consult the [FAQ](https://github.com/google/closure-compiler/wiki/FAQ)
16
+
1. Post in the [Closure Compiler Discuss Group](https://groups.google.com/forum/#!forum/closure-compiler-discuss).
17
+
2. Ask a question on [Stack Overflow](http://stackoverflow.com/questions/tagged/google-closure-compiler).
18
+
3. Consult the [FAQ](https://github.com/google/closure-compiler/wiki/FAQ).
18
19
19
20
## Building it Yourself
20
21
@@ -40,21 +41,29 @@ Note: The Closure Compiler requires [Java 7 or higher](http://www.java.com/).
40
41
</profile>
41
42
```
42
43
43
-
3.Run`mvn -DskipTests` (omit the `-DskipTests` if you want to run all the
44
+
3.On the command line, at the root of this project, run`mvn -DskipTests` (omit the `-DskipTests` if you want to run all the
44
45
unit tests too).
45
46
46
-
This will produce a jar file called `target/closure-compiler-1.0-SNAPSHOT.jar`.
47
+
This will produce a jar file called `target/closure-compiler-1.0-SNAPSHOT.jar`. You can run this jar
48
+
as per the [Running section](#running) of this Readme. If you want to depend on the compiler via
49
+
Maven in another Java project, use the `com.google.javascript/closure-compiler-unshaded` artifact.
will skip building the GWT version of the compiler. This can speed up the build process significantly.
47
53
48
54
### Using [Eclipse](http://www.eclipse.org/)
49
55
50
56
1. Download and open the [Eclipse IDE](http://www.eclipse.org/).
51
-
2. Navigate to `File > New > Project ...` and create a Java Project. Give
52
-
the project a name.
53
-
3. Select `Create project from existing source` and choose the root of the
54
-
checked-out source tree as the existing directory.
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`.
57
+
2. On the command line, at the root of this project, run `mvn eclipse:eclipse -DdownloadSources=true` to download JARs and build Eclipse project configuration.
58
+
3. Navigate to `File > Import > Maven > Existing Maven Projects` and browse to closure-compiler inside of Eclipse.
59
+
4. Import both closure-compiler and the nested externs project.
60
+
5. Disregard the warnings about maven-antrun-plugin and build errors.
61
+
6. In Package Explorer, remove from the build path:
7.[Exclude the files](http://stackoverflow.com/questions/1187868/how-can-i-exclude-some-folders-from-my-eclipse-project) in the directory `src/com/google/debugging/sourcemap/super` from the project.
65
+
8. Build project in Eclipse (right click on the project `closure-compiler-parent` and select `Build Project`).
66
+
9. See *Using Maven* above to build the JAR.
58
67
59
68
## Running
60
69
@@ -88,6 +97,14 @@ java -jar compiler.jar --help
88
97
More detailed information about running the Closure Compiler is available in the
1. Open the class `src/com/google/javascript/jscomp/CommandLineRunner.java` or create your own extended version of the class.
104
+
2. Run the class in Eclipse.
105
+
3. See the instructions above on how to use the interactive mode - but beware of the [bug](http://stackoverflow.com/questions/4711098/passing-end-of-transmission-ctrl-d-character-in-eclipse-cdt-console) regarding passing "End of Transmission" in the Eclipse console.
106
+
107
+
91
108
## Compiling Multiple Scripts
92
109
93
110
If you have multiple scripts, you should compile them all together with one
@@ -147,7 +164,9 @@ will re-order the inputs automatically.
147
164
signed for them.
148
165
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)
0 commit comments