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. R=ianh@google.com
diff --git a/sky/examples/README.md b/sky/examples/README.md index 6305be9..deb0f3c 100644 --- a/sky/examples/README.md +++ b/sky/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/sky/examples/color/pubspec.yaml b/sky/examples/color/pubspec.yaml new file mode 100644 index 0000000..c332061 --- /dev/null +++ b/sky/examples/color/pubspec.yaml
@@ -0,0 +1,3 @@ +name: color +dependencies: + sky: any
diff --git a/sky/examples/hello_world/pubspec.yaml b/sky/examples/hello_world/pubspec.yaml new file mode 100644 index 0000000..fb27d11 --- /dev/null +++ b/sky/examples/hello_world/pubspec.yaml
@@ -0,0 +1,3 @@ +name: hello_world +dependencies: + sky: any
diff --git a/sky/examples/raw/pubspec.yaml b/sky/examples/raw/pubspec.yaml new file mode 100644 index 0000000..65813d5 --- /dev/null +++ b/sky/examples/raw/pubspec.yaml
@@ -0,0 +1,3 @@ +name: raw +dependencies: + sky: any
diff --git a/sky/examples/widgets/pubspec.yaml b/sky/examples/widgets/pubspec.yaml new file mode 100644 index 0000000..1f45fe8 --- /dev/null +++ b/sky/examples/widgets/pubspec.yaml
@@ -0,0 +1,3 @@ +name: widgets +dependencies: + sky: any
diff --git a/sky/sdk/README.md b/sky/sdk/README.md index e27175d..7ff1c58 100644 --- a/sky/sdk/README.md +++ b/sky/sdk/README.md
@@ -131,13 +131,23 @@ ------------------------- 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 ---------------------