Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: docs/closure_compilation.md

Issue 1776423002: Closure: update doc to advocate for v2 and deprecate v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: spelling nit Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/closure_compilation.md
diff --git a/docs/closure_compilation.md b/docs/closure_compilation.md
index 931029c56cdc9a4c2e8b6698833d7d0a760b3150..ddd5373e747c82ca992d9ab4071a0a3ee4cd6788 100644
--- a/docs/closure_compilation.md
+++ b/docs/closure_compilation.md
@@ -2,20 +2,42 @@
## I just need to fix the compile!
-To locally run closure compiler like the bots, do this:
+### Pre-requisites
+You'll need Java 7 (preferably the OpenJDK version). To install on Ubuntu:
```shell
-cd $CHROMIUM_SRC
-# sudo apt-get install openjdk-7-jre # may be required
-GYP_GENERATORS=ninja tools/gyp/gyp --depth . third_party/closure_compiler/compiled_resources.gyp
-ninja -C out/Default
+sudo apt-get install openjdk-7-jre
```
-To run the v2 gyp format, change the last 2 lines to:
+On Mac or Windows, visit:
+[http://www.oracle.com/technetwork/java/javase/downloads/index.html](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
+
+### Using ninja to compile the code
+We use GYP and ninja as our build system. To generate the ninja files from GYP:
```shell
-# notice the 2 in compiled_resources2.gyp
+# notice the 2 in compiled_resources.gyp
GYP_GENERATORS=ninja tools/gyp/gyp --depth . third_party/closure_compiler/compiled_resources2.gyp
+```
+
+To compile the JavaScript:
+```shell
+ninja -C out/Default
+```
+
+The output should look something like this:
+```shell
+ninja: Entering directory `out/Default/'
+[30/106] ACTION Compiling chrome/browser/resources/md_history/constants.js
+```
+
+To generate and run the **deprecated** v1 gyp format, remove the "2" from "compiled_resources2.gyp":
+```shell
+$ GYP_GENERATORS=ninja tools/gyp/gyp --depth . third_party/closure_compiler/compiled_resources.gyp
+```
+
+Compiling works the same way for both v1 and v2 systems:
+```shell
ninja -C out/Default
dpapad 2016/03/09 20:19:22 Nit(optional): You might want to add a note of *ne
Dan Beam 2016/03/09 21:53:55 Done.
```
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698