Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: mojo/tools/mojo_demo.py

Issue 990493002: Make package: work like Dart expects in preparation for a Sky SDK (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Made deploy_sdk 100x faster in the --dev-environment case Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « examples/location/location.sky ('k') | sky/SDK.md » ('j') | sky/sdk/README.md » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/mojo_demo.py
diff --git a/mojo/tools/mojo_demo.py b/mojo/tools/mojo_demo.py
index a30a68cfb92f56fa51242a982925aa9642dba2fc..56915b66aa7fba1fd22a6c7cdcb3fc2b3d473781 100755
--- a/mojo/tools/mojo_demo.py
+++ b/mojo/tools/mojo_demo.py
@@ -36,7 +36,20 @@ def main():
HTTP_PORT = 9999
configuration = 'Debug' if config.is_debug else 'Release'
- server = SkyServer(HTTP_PORT, configuration, paths.src_root)
+
+ # package: urls in Sky's Dart code expect sky and mojo dart packages
+ # vended from /packages. Make sure we build mojo/sky packages before serving:
+ sdk_root = os.path.join(paths.build_dir, 'gen', 'sky_sdk')
+ packages_root = os.path.join(sdk_root, 'packages_root')
+ subprocess.check_call([
+ os.path.join(paths.src_root, 'sky', 'tools', 'deploy_sdk.py'),
+ '--build-dir', paths.build_dir,
+ '--force',
abarth-chromium 2015/03/13 23:55:09 --non-interactive ?
+ '--dev-environment',
+ '--fake-pub-get-into', packages_root,
+ sdk_root,
+ ])
+ server = SkyServer(HTTP_PORT, configuration, paths.src_root, packages_root)
if args.demo == 'browser':
base_url = server.path_as_url(paths.build_dir)
« no previous file with comments | « examples/location/location.sky ('k') | sky/SDK.md » ('j') | sky/sdk/README.md » ('J')

Powered by Google App Engine
This is Rietveld 408576698