OLD | NEW |
---|---|
1 # Dart2js Info | 1 # Dart2js Info |
2 | 2 |
3 This package contains libraries and tools you can use to process `.info.json` | 3 This package contains libraries and tools you can use to process `.info.json` |
4 files, which are produced when running dart2js with `--dump-info`. | 4 files, which are produced when running dart2js with `--dump-info`. |
5 | 5 |
6 The `.info.json` files contain data about each element included in | 6 The `.info.json` files contain data about each element included in |
7 the output of your program. The data includes information such as: | 7 the output of your program. The data includes information such as: |
8 | 8 |
9 * the size that each function adds to the `.dart.js` output, | 9 * the size that each function adds to the `.dart.js` output, |
10 * dependencies between functions, | 10 * dependencies between functions, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 | 200 |
201 ```bash | 201 ```bash |
202 pub global activate dart2js_info # only needed once | 202 pub global activate dart2js_info # only needed once |
203 dart2js_info_deferred_library_check out.js.info.json manifest.yaml | 203 dart2js_info_deferred_library_check out.js.info.json manifest.yaml |
204 ``` | 204 ``` |
205 | 205 |
206 The format of the YAML file is: | 206 The format of the YAML file is: |
207 | 207 |
208 ```yaml | 208 ```yaml |
209 main: | 209 main: |
210 packages: | 210 include: |
211 - some_package | 211 - some_package |
Siggi Cherem (dart-lang)
2015/12/18 02:29:41
I like that the new syntax allows you to extend th
Harry Terkelsen
2015/12/18 21:22:21
Right, we can add that when customers want to chec
| |
212 - other_package | 212 - other_package |
213 exclude: | |
214 - some_other_package | |
213 | 215 |
214 foo: | 216 foo: |
215 packages: | 217 include: |
216 - foo | 218 - foo |
217 - bar | 219 - bar |
218 | 220 |
219 baz: | 221 baz: |
220 packages: | 222 include: |
221 - baz | 223 - baz |
222 - quux | 224 - quux |
225 exclude: | |
226 - zardoz | |
223 ``` | 227 ``` |
224 | 228 |
225 The YAML file consists of a list of declarations, one for each deferred | 229 The YAML file consists of a list of declarations, one for each deferred |
226 part expected in the output. At least one of these parts must be named | 230 part expected in the output. At least one of these parts must be named |
227 "main"; this is the main part that contains the program entrypoint. Each | 231 "main"; this is the main part that contains the program entrypoint. Each |
228 top-level part contains a list of package names that are expected to be | 232 top-level part contains a list of package names that are expected to be |
229 contained in that part. Any package that is not explicitly listed is | 233 contained in that part, a list of package names that are expected to be in |
230 expected to be in the main part. For instance, in the example YAML above | 234 another part, or both. For instance, in the example YAML above the part named |
231 the part named "baz" is expected to contain the packages "baz" and "quux". | 235 "baz" is expected to contain the packages "baz" and "quux" and exclude the |
236 package "zardoz". | |
232 | 237 |
233 The names for parts given in the specification YAML file (besides "main") | 238 The names for parts given in the specification YAML file (besides "main") |
234 are arbitrary and just used for reporting when the output does not meet the | 239 are the same as the name given to the deferred import in the dart file. For |
235 specification. | 240 instance, if you have `import 'package:foo/foo.dart' deferred as foo;` in your |
Siggi Cherem (dart-lang)
2015/12/18 02:29:41
to make it less ambiguous, it might be worth chang
Harry Terkelsen
2015/12/18 21:22:21
It's actually the other way. The part after 'as' i
Siggi Cherem (dart-lang)
2015/12/18 21:34:25
I see, thanks for clarifying, that's nice, for som
| |
241 dart file, then the corresponding name in the specification file is 'foo'. | |
236 | 242 |
237 ### Function size analysis tool | 243 ### Function size analysis tool |
238 | 244 |
239 This command-line tool presents how much each function contributes to the total | 245 This command-line tool presents how much each function contributes to the total |
240 code of your application. We use dependency information to compute dominance | 246 code of your application. We use dependency information to compute dominance |
241 and reachability data as well. | 247 and reachability data as well. |
242 | 248 |
243 When you run: | 249 When you run: |
244 ```bash | 250 ```bash |
245 pub global activate dart2js_info # only needed once | 251 pub global activate dart2js_info # only needed once |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 | 318 |
313 [repo]: https://github.com/dart-lang/dart2js_info/ | 319 [repo]: https://github.com/dart-lang/dart2js_info/ |
314 [tracker]: https://github.com/dart-lang/dart2js_info/issues | 320 [tracker]: https://github.com/dart-lang/dart2js_info/issues |
315 [code_deps]: https://github.com/dart-lang/dart2js_info/blob/master/bin/code_deps .dart | 321 [code_deps]: https://github.com/dart-lang/dart2js_info/blob/master/bin/code_deps .dart |
316 [lib_split]: https://github.com/dart-lang/dart2js_info/blob/master/bin/library_s ize_split.dart | 322 [lib_split]: https://github.com/dart-lang/dart2js_info/blob/master/bin/library_s ize_split.dart |
317 [deferred_lib]: https://github.com/dart-lang/dart2js_info/blob/master/bin/deferr ed_library_check.dart | 323 [deferred_lib]: https://github.com/dart-lang/dart2js_info/blob/master/bin/deferr ed_library_check.dart |
318 [coverage]: https://github.com/dart-lang/dart2js_info/blob/master/bin/coverage_l og_server.dart | 324 [coverage]: https://github.com/dart-lang/dart2js_info/blob/master/bin/coverage_l og_server.dart |
319 [live]: https://github.com/dart-lang/dart2js_info/blob/master/bin/live_code_size _analysis.dart | 325 [live]: https://github.com/dart-lang/dart2js_info/blob/master/bin/live_code_size _analysis.dart |
320 [function_analysis]: https://github.com/dart-lang/dart2js_info/blob/master/bin/f unction_size_analysis.dart | 326 [function_analysis]: https://github.com/dart-lang/dart2js_info/blob/master/bin/f unction_size_analysis.dart |
321 [AllInfo]: http://dart-lang.github.io/dart2js_info/doc/api/dart2js_info.info/All Info-class.html | 327 [AllInfo]: http://dart-lang.github.io/dart2js_info/doc/api/dart2js_info.info/All Info-class.html |
OLD | NEW |