Use correct icon for database in serverinfo div
[phpmyadmin/last10db.git] / scripts / google-javascript-compiler / README
blob8718f5b572f63433b03abfc176f59da6f087f163
1 /*
2  * Copyright 2009 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
18 // Contents
21 The Closure Compiler performs checking, instrumentation, and
22 optimizations on JavaScript code. The purpose of this README is to
23 explain how to build and run the Closure Compiler.
25 The Closure Compiler requires Java 6 or higher.
26 http://www.java.com/
30 // Building The Closure Compiler
33 There are three ways to get a Closure Compiler executable.
35 1) Use one we built for you.
37 Pre-built Closure binaries can be found at
38 http://code.google.com/p/closure-compiler/downloads/list
41 2) Check out the source and build it with Apache Ant.
43 First, check out the full source tree of the Closure Compiler. There
44 are instructions on how to do this at the project site.
45 http://code.google.com/p/closure-compiler/source/checkout
47 Apache Ant is a cross-platform build tool.
48 http://ant.apache.org/
50 At the root of the source tree, there is an Ant file named
51 build.xml. To use it, navigate to the same directory and type the
52 command
54 ant jar
56 This will produce a jar file called "build/compiler.jar".
59 3) Check out the source and build it with Eclipse.
61 Eclipse is a cross-platform IDE.
62 http://www.eclipse.org/
64 Under Eclipse's File menu, click "New > Project ..." and create a
65 "Java Project."  You will see an options screen. Give the project a
66 name, select "Create project from existing source," and choose the
67 root of the checked-out source tree as the existing directory. Verify
68 that you are using JRE version 6 or higher.
70 Eclipse can use the build.xml file to discover rules. When you
71 navigate to the build.xml file, you will see all the build rules in
72 the "Outline" pane. Run the "jar" rule to build the compiler in
73 build/compiler.jar.
77 // Running The Closure Compiler
80 Once you have the jar binary, running the Closure Compiler is straightforward.
82 On the command line, type
84 java -jar compiler.jar
86 This starts the compiler in interactive mode. Type
88 var x = 17 + 25;
90 then hit "Enter", then hit "Ctrl-Z" (on Windows) or "Ctrl-D" (on Mac or Linux)
91 and "Enter" again. The Compiler will respond:
93 var x=42;
95 The Closure Compiler has many options for reading input from a file,
96 writing output to a file, checking your code, and running
97 optimizations. To learn more, type
99 java -jar compiler.jar --help
101 You can read more detailed documentation about the many flags at
102 http://code.google.com/closure/compiler/docs/gettingstarted_app.html
106 // Compiling Multiple Scripts
109 If you have multiple scripts, you should compile them all together with
110 one compile command.
112 java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js
114 The Closure Compiler will concatenate the files in the order they're
115 passed at the command line.
117 If you need to compile many, many scripts together, you may start to
118 run into problems with managing dependencies between scripts. You
119 should check out the Closure Library. It contains functions for
120 enforcing dependencies between scripts, and a tool called calcdeps.py
121 that knows how to give scripts to the Closure Compiler in the right
122 order.
124 http://code.google.com/p/closure-library/
127 // Licensing
130 Unless otherwise stated, all source files are licensed under
131 the Apache License, Version 2.0.
134 -----
135 Code under:
136 src/com/google/javascript/rhino
137 test/com/google/javascript/rhino
139 URL: http://www.mozilla.org/rhino
140 Version:  1.5R3, with heavy modifications
141 License:  Netscape Public License and MPL / GPL dual license
143 Description: A partial copy of Mozilla Rhino. Mozilla Rhino is an
144 implementation of JavaScript for the JVM.  The JavaScript parser and
145 the parse tree data structures were extracted and modified
146 significantly for use by Google's JavaScript compiler.
148 Local Modifications: The packages have been renamespaced. All code not
149 relavant to parsing has been removed. A JSDoc parser and static typing
150 system have been added.
153 -----
154 Code in:
155 lib/libtrunk_rhino_parser_jarjared.jar
157 Rhino
158 URL: http://www.mozilla.org/rhino
159 Version:  Trunk
160 License:  Netscape Public License and MPL / GPL dual license
162 Description: Mozilla Rhino is an implementation of JavaScript for the JVM.
164 Local Modifications: None. We've used JarJar to renamespace the code
165 post-compilation. See:
166 http://code.google.com/p/jarjar/
169 -----
170 Code in:
171 lib/args4j_deploy.jar
173 Args4j
174 URL: https://args4j.dev.java.net/
175 Version: 2.0.9
176 License: MIT
178 Description:
179 args4j is a small Java class library that makes it easy to parse command line
180 options/arguments in your CUI application.
182 Local Modifications: None.
185 -----
186 Code in:
187 lib/google_common_deploy.jar
189 Guava Libraries
190 URL: http://code.google.com/p/guava-libraries/
191 Version:  Trunk
192 License: Apache License 2.0
194 Description: Google's core Java libraries.
196 Local Modifications: None.
199 -----
200 Code in:
201 lib/hamcrest-core-1.1.jar
203 Hamcrest
204 URL: http://code.google.com/p/hamcrest
205 License: BSD
206 License File: LICENSE
208 Description:
209 Provides a library of matcher objects (also known as constraints or
210 predicates) allowing 'match' rules to be defined declaratively, to be used in
211 other frameworks. Typical scenarios include testing frameworks, mocking
212 libraries and UI validation rules.
214 Local modifications:
215 The original jars contained both source code and compiled classes.
217 hamcrest-core-1.1.jar just contains the compiled classes.
220 ----
221 Code in:
222 lib/junit.jar
224 JUnit
225 URL:  http://sourceforge.net/projects/junit/
226 Version:  4.5
227 License:  Common Public License 1.0
229 Description: A framework for writing and running automated tests in Java.
231 Local Modifications: None.
235 Code in:
236 lib/protobuf_deploy.jar
238 Protocol Buffers
239 URL: http://code.google.com/p/protobuf/
240 Version: 2.2.0a
241 License: New BSD License
243 Description: Supporting libraries for protocol buffers,
244 an encoding of structured data.
246 Local Modifications: None
250 Code in:
251 lib/ant_deploy.jar
253 URL: http://ant.apache.org/bindownload.cgi
254 Version: 1.6.5
255 License: Apache License 2.0
256 Description:
257   Ant is a Java based build tool. In theory it is kind of like "make"
258   without make's wrinkles and with the full portability of pure java code.
260 Local Modifications:
261   Modified apache-ant-1.6.5/bin/ant to look in the ant.runfiles directory