| OLD | NEW |
| 1 # This is a configuration file for devtools (`mojo_run`, `mojo_test) running | 1 # This is a configuration file for devtools (`mojo_run`, `mojo_test) running |
| 2 # within a Mojo checkout. | 2 # within a Mojo checkout. |
| 3 | 3 |
| 4 # The content has to parse to a Python dictionary literal. Strings of the form | 4 # The content has to parse to a Python dictionary literal. Strings of the form |
| 5 # '@{ABC}' are aliases that will be substituted for their values before | 5 # '@{ABC}' are aliases that will be substituted for their values before |
| 6 # evaluation: | 6 # evaluation: |
| 7 # '@{BUILD_DIR}': path to the output directory | 7 # '@{BUILD_DIR}': path to the output directory |
| 8 | 8 |
| 9 { | 9 { |
| 10 # Each dev server will be configured as specified and mapped for the | 10 # Each dev server will be configured as specified and mapped for the |
| 11 # indicated host using --map-origin. | 11 # indicated host using --map-origin. |
| 12 'dev_servers': [ | 12 'dev_servers': [ |
| 13 { | 13 { |
| 14 'host': 'https://core.mojoapps.io/', | 14 'host': 'https://core.mojoapps.io/', |
| 15 # First matching prefix will apply. Within the directiories specified for | 15 # First matching prefix will apply. Within the directiories specified for |
| 16 # a prefix, first location that contains the requested path will apply. | 16 # a prefix, first location that contains the requested path will apply. |
| 17 'mappings': [ | 17 'mappings': [ |
| 18 ('packages/', ['@{BUILD_DIR}/gen/dart-pkg/packages']), | 18 ('packages/', ['@{BUILD_DIR}/gen/dart-pkg/packages']), |
| 19 ('', ['@{BUILD_DIR}']), | 19 ('', [ |
| 20 # We map two directiories, so that both exploded dart apps under |
| 21 # checkout root and built apps in the build directory are available. |
| 22 # For example, one could refer to the apps of either type using urls: |
| 23 # - https://core.mojoapps.io/spinning_cube.mojo |
| 24 # - https://core.mojoapps.io/examples/dart/device_info/main.dart |
| 25 '@{BUILD_DIR}', |
| 26 '.' |
| 27 ]), |
| 20 ], | 28 ], |
| 21 }, | 29 }, |
| 22 ], | 30 ], |
| 23 } | 31 } |
| OLD | NEW |