OLD | NEW |
1 # Closure Compilation | 1 # Closure Compilation |
2 | 2 |
3 ## What is type safety? | 3 ## What is type safety? |
4 | 4 |
5 [Strongly-typed languages](https://en.wikipedia.org/wiki/Strong_and_weak_typing) | 5 [Strongly-typed languages](https://en.wikipedia.org/wiki/Strong_and_weak_typing) |
6 like C++ and Java have the notion of variable types. | 6 like C++ and Java have the notion of variable types. |
7 | 7 |
8 This is typically baked into how you declare variables: | 8 This is typically baked into how you declare variables: |
9 | 9 |
10 ```c++ | 10 ```c++ |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 'includes': ['../path/to/third_party/closure_compiler/compile_js2.gypi'], | 109 'includes': ['../path/to/third_party/closure_compiler/compile_js2.gypi'], |
110 }, | 110 }, |
111 ], | 111 ], |
112 } | 112 } |
113 ``` | 113 ``` |
114 | 114 |
115 ## Running Closure compiler locally | 115 ## Running Closure compiler locally |
116 | 116 |
117 You can locally test that your code compiles on Linux or Mac. This requires | 117 You can locally test that your code compiles on Linux or Mac. This requires |
118 [Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and a | 118 [Java](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and a |
119 [Chrome checkout](http://www.chromium.org/developers/how-tos/get-the-code) (i.e. | 119 [Chrome checkout](https://www.chromium.org/developers/how-tos/get-the-code) (i.e
. |
120 python, depot_tools). Note: on Ubuntu, you can probably just run `sudo apt-get | 120 python, depot_tools). Note: on Ubuntu, you can probably just run `sudo apt-get |
121 install openjdk-7-jre`. | 121 install openjdk-7-jre`. |
122 | 122 |
123 Now you should be able to run: | 123 Now you should be able to run: |
124 | 124 |
125 ```shell | 125 ```shell |
126 third_party/closure_compiler/run_compiler | 126 third_party/closure_compiler/run_compiler |
127 ``` | 127 ``` |
128 | 128 |
129 and should see output like this: | 129 and should see output like this: |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 'dependencies': [ | 187 'dependencies': [ |
188 # ... other projects ... | 188 # ... other projects ... |
189 ++ '../my_project/compiled_resources2.gyp:*', | 189 ++ '../my_project/compiled_resources2.gyp:*', |
190 ], | 190 ], |
191 } | 191 } |
192 ] | 192 ] |
193 } | 193 } |
194 ``` | 194 ``` |
195 | 195 |
196 This file is used by the | 196 This file is used by the |
197 [Closure compiler bot](http://build.chromium.org/p/chromium.fyi/builders/Closure
%20Compilation%20Linux) | 197 [Closure compiler bot](https://build.chromium.org/p/chromium.fyi/builders/Closur
e%20Compilation%20Linux) |
198 to automatically compile your code on every commit. | 198 to automatically compile your code on every commit. |
OLD | NEW |