From 3afd5e5a77e6f45be05850f5b38061f17062bb8e Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Tue, 28 Apr 2015 16:26:38 -0700 Subject: [PATCH] Add pubspec.yaml files for each of the examples/ directories so that pub get will create a packages/ directory for each and users of packages/sky/sky_tool can run these examples from sky_sdk as the instructions say to. TBR=ianh@google.com https://github.com/domokit/mojo/issues/128 Review URL: https://codereview.chromium.org/1110283002 --- examples/README.md | 5 ++++- examples/color/pubspec.yaml | 3 +++ examples/hello_world/pubspec.yaml | 3 +++ examples/raw/pubspec.yaml | 3 +++ examples/widgets/pubspec.yaml | 3 +++ sdk/README.md | 18 ++++++++++++++---- 6 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 examples/color/pubspec.yaml create mode 100644 examples/hello_world/pubspec.yaml create mode 100644 examples/raw/pubspec.yaml create mode 100644 examples/widgets/pubspec.yaml diff --git a/examples/README.md b/examples/README.md index 6305be968..deb0f3cf1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,7 +1,10 @@ Sky Examples ============ -This directory contains several examples of using Sky. +This directory contains several examples of using Sky. Each of these is an +individual Dart application package. If you wish to run them with `sky_tool` +then you will want to run `pub get` inside their directory before running +`./packages/sky/sky_tool start`. 1. *Hello, world.* The [hello world app](hello_world) is a basic app that shows the text "hello, world." diff --git a/examples/color/pubspec.yaml b/examples/color/pubspec.yaml new file mode 100644 index 000000000..c3320617b --- /dev/null +++ b/examples/color/pubspec.yaml @@ -0,0 +1,3 @@ +name: color +dependencies: + sky: any diff --git a/examples/hello_world/pubspec.yaml b/examples/hello_world/pubspec.yaml new file mode 100644 index 000000000..fb27d11e6 --- /dev/null +++ b/examples/hello_world/pubspec.yaml @@ -0,0 +1,3 @@ +name: hello_world +dependencies: + sky: any diff --git a/examples/raw/pubspec.yaml b/examples/raw/pubspec.yaml new file mode 100644 index 000000000..65813d545 --- /dev/null +++ b/examples/raw/pubspec.yaml @@ -0,0 +1,3 @@ +name: raw +dependencies: + sky: any diff --git a/examples/widgets/pubspec.yaml b/examples/widgets/pubspec.yaml new file mode 100644 index 000000000..1f45fe870 --- /dev/null +++ b/examples/widgets/pubspec.yaml @@ -0,0 +1,3 @@ +name: widgets +dependencies: + sky: any diff --git a/sdk/README.md b/sdk/README.md index e27175d14..7ff1c5859 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -131,13 +131,23 @@ Running a Sky application ------------------------- The `sky` pub package includes a `sky_tool` script to assist in running -Sky applications inside the `SkyDemo.apk` harness. +Sky applications inside the `SkyDemo.apk` harness. The sky_tool script expects +to be run from the root directory of your application pub package. To run +one of the examples in this SDK, try: -1. ``packages/sky/sky_tool start --install examples/stocks/main.sky`` +1. ``cd examples/stocks`` + +2. ``pub get`` to set up a copy of the sky package in the app directory. + +3. ``./packages/sky/sky_tool start --install`` The --install flag is only necessary to install SkyDemo.apk if not already - installed from the Google Play store. + installed on the device. -2. Use ``adb logcat`` to view any errors or Dart print() output from the app. +4. Use ``adb logcat`` to view any errors or Dart print() output from the app. + ``adb logcat -s chromium`` can be used to filter only adb messages from + `SkyDemo.apk` (which for + [legacy reasons](https://github.com/domokit/mojo/issues/129) still uses the + android log tag 'chromium'). Measuring Performance --------------------- -- GitLab