OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 set -e | 2 set -e |
3 # switch to the root directory of dev_compiler | 3 # switch to the root directory of dev_compiler |
4 cd $( dirname "${BASH_SOURCE[0]}" )/.. | 4 cd $( dirname "${BASH_SOURCE[0]}" )/.. |
5 | 5 |
6 echo "*** Patching SDK" | 6 echo "*** Patching SDK" |
7 dart -c tool/patch_sdk.dart tool/input_sdk gen/patched_sdk | 7 dart -c tool/patch_sdk.dart tool/input_sdk gen/patched_sdk |
8 | 8 |
9 echo "*** Compiling SDK to JavaScript" | 9 echo "*** Compiling SDK to JavaScript" |
10 | 10 |
11 # TODO(jmesserly): break out dart:html & friends. | 11 # TODO(jmesserly): break out dart:html & friends. |
12 # | |
13 # Right now we can't summarize our SDK, so we can't treat it as a normal | |
14 # explicit input (instead we're implicitly compiling against the user's SDK). | |
15 # | |
16 # Another possible approach is to hard code the dart:* library->module mapping | |
17 # into the compiler itself, so it can emit the correct import. | |
18 # | |
19 dart -c tool/build_sdk.dart \ | 12 dart -c tool/build_sdk.dart \ |
20 --dart-sdk gen/patched_sdk \ | 13 --dart-sdk gen/patched_sdk \ |
21 -o lib/runtime/dart_sdk.js \ | 14 --modules=amd \ |
| 15 -o lib/js/amd/dart_sdk.js \ |
| 16 --modules=es6 \ |
| 17 -o lib/js/es6/dart_sdk.js \ |
| 18 --modules=common \ |
| 19 -o lib/js/common/dart_sdk.js \ |
| 20 --modules=legacy \ |
| 21 -o lib/js/legacy/dart_sdk.js \ |
22 "$@" > tool/sdk_expected_errors.txt | 22 "$@" > tool/sdk_expected_errors.txt |
OLD | NEW |