Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 # A polymer application compiled with dart2js depends on | 3 # A polymer application compiled with dart2js depends on |
| 4 # 4 js files: | 4 # 4 js files: |
| 5 # 1) packages/shadow_dom/shadow_dom.debug.js | 5 # 1) packages/shadow_dom/shadow_dom.debug.js |
| 6 # 2) packages/custom_element/custom-elements.debug.js | 6 # 2) packages/custom_element/custom-elements.debug.js |
| 7 # 3) packages/browser/interop.js | 7 # 3) packages/browser/interop.js |
| 8 # 4) index.html_bootstrap.dart.precompiled.js | 8 # 4) index.html_bootstrap.dart.precompiled.js |
| 9 | 9 |
| 10 # This script rolls 1, 2, 3, and 4 into index.html_bootstrap.dart.js | 10 # This script rolls 1, 2, 3, and 4 into index.html_bootstrap.dart.js |
| 11 | 11 |
| 12 # Relative paths to four scripts. | 12 # Relative paths to four scripts. |
| 13 SHADOW_DOM="packages/shadow_dom/shadow_dom.debug.js" | 13 SHADOW_DOM="packages/shadow_dom/shadow_dom.debug.js" |
| 14 CUSTOM_ELEMENTS="packages/custom_element/custom-elements.debug.js" | 14 CUSTOM_ELEMENTS="packages/custom_element/custom-elements.debug.js" |
| 15 INTEROP="packages/browser/interop.js" | 15 INTEROP="packages/browser/interop.js" |
| 16 OBSERVATORY="index.html_bootstrap.dart.precompiled.js" | 16 OBSERVATORY="index.html_bootstrap.dart.precompiled.js" |
| 17 OBSERVATORY_DEVTOOLS="index_devtools.html_bootstrap.dart.precompiled.js" | 17 OBSERVATORY_DEVTOOLS="index_devtools.html_bootstrap.dart.precompiled.js" |
| 18 | 18 |
| 19 # Base directory | 19 # Base directory |
| 20 BASE="out/web" | 20 BASE="out/web" |
| 21 DEPLOYED="deployed/web" | 21 DEPLOYED="deployed/web" |
| 22 | 22 |
| 23 INPUT="$BASE/$SHADOW_DOM" | 23 INPUT="$BASE/$SHADOW_DOM" |
| 24 INPUT="$INPUT $BASE/$CUSTOM_ELEMENTS" | 24 INPUT="$INPUT $BASE/$CUSTOM_ELEMENTS" |
| 25 INPUT="$INPUT $BASE/$INTEROP" | 25 INPUT="$INPUT $BASE/$INTEROP" |
| 26 INPUT="$INPUT $BASE/$OBSERVATORY" | |
| 27 | 26 |
| 28 OUTPUT="$DEPLOYED/index.html_bootstrap.dart.js" | 27 INPUT_STANDALONE="$INPUT $BASE/$OBSERVATORY" |
| 28 OUTPUT_STANDALONE="$DEPLOYED/index.html_bootstrap.dart.js" | |
| 29 | 29 |
| 30 # Rolling | 30 # Rolling |
| 31 cat $INPUT > $OUTPUT | 31 cat $INPUT_STANDALONE > $OUTPUT_STANDALONE |
|
Cutch
2014/01/27 19:53:11
We were rolling both the standalone and the devtoo
| |
| 32 cp $BASE/index.html $DEPLOYED/index.html | 32 cp $BASE/index.html $DEPLOYED/index.html |
| 33 | 33 |
| 34 INPUT_DEVTOOLS="$INPUT $BASE/$OBSERVATORY_DEVTOOLS" | 34 INPUT_DEVTOOLS="$INPUT $BASE/$OBSERVATORY_DEVTOOLS" |
| 35 OUTPUT_DEVTOOLS="$DEPLOYED/index_devtools.html_bootstrap.dart.js" | 35 OUTPUT_DEVTOOLS="$DEPLOYED/index_devtools.html_bootstrap.dart.js" |
| 36 | 36 |
| 37 cat $INPUT_DEVTOOLS > $OUTPUT_DEVTOOLS | 37 cat $INPUT_DEVTOOLS > $OUTPUT_DEVTOOLS |
| 38 cp $BASE/index_devtools.html $DEPLOYED/index_devtools.html | 38 cp $BASE/index_devtools.html $DEPLOYED/index_devtools.html |
| 39 | |
| 40 # Kill package <script> tags added by polymer compilation. | |
|
Cutch
2014/01/27 19:53:11
This kills console spam.
turnidge
2014/01/28 18:28:08
Make this a comment in the file.
Cutch
2014/01/28 23:23:19
Done.
| |
| 41 perl -pi -e 's/<script src="packages.*"><\/script>//g' \ | |
| 42 $DEPLOYED/index.html | |
| 43 perl -pi -e 's/<script src="packages.*"><\/script>//g' \ | |
| 44 $DEPLOYED/index_devtools.html | |
| 45 | |
| 46 # Fixup <img> src broken by polymer compilation. | |
|
Cutch
2014/01/27 19:53:11
This fixes the Dart icon so that it never results
turnidge
2014/01/28 18:28:08
Make this a comment in the file.
Cutch
2014/01/28 23:23:19
Done.
| |
| 47 perl -pi -e 's/packages\/observatory\/src\/observatory_elements\///g' \ | |
| 48 $DEPLOYED/index.html | |
| 49 perl -pi -e 's/packages\/observatory\/src\/observatory_elements\///g' \ | |
| 50 $DEPLOYED/index_devtools.html | |
| OLD | NEW |